Skip to content

Commit b0583ee

Browse files
author
Developer
committed
Fix code formatting with Prettier
- Apply Prettier formatting to all modified files - Ensures consistent code style across the codebase - Fixes formatting warnings in CI/CD checks
1 parent 584f807 commit b0583ee

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

js/block.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,7 +3600,7 @@ class Block {
36003600
for (let i = 0; i < keys.length; i++) {
36013601
const temperament = getTemperament(keys[i]);
36023602
// Only add valid temperaments to noteLabels
3603-
if (temperament && typeof temperament === 'object') {
3603+
if (temperament && typeof temperament === "object") {
36043604
noteLabels[keys[i]] = temperament;
36053605
}
36063606
if (isCustomTemperament(keys[i])) {
@@ -3619,7 +3619,11 @@ class Block {
36193619
} else {
36203620
// Ensure we have a valid temperament before accessing its properties
36213621
const selectedTemperament = getTemperament(selectedCustom);
3622-
if (selectedTemperament && selectedTemperament["0"] && selectedTemperament["0"][1]) {
3622+
if (
3623+
selectedTemperament &&
3624+
selectedTemperament["0"] &&
3625+
selectedTemperament["0"][1]
3626+
) {
36233627
selectedNote = selectedTemperament["0"][1];
36243628
} else {
36253629
// Fallback to a default note

js/blocks/__tests__/GraphicsBlocks.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ describe("GraphicsBlocks", () => {
8383
blocks: {
8484
blockList: [
8585
{ connections: [1] }, // Block 0 with connection to block 1
86-
{ connections: [2] }, // Block 1 with connection to block 2
87-
{ connections: [0] } // Block 2 with connection to block 0
86+
{ connections: [2] }, // Block 1 with connection to block 2
87+
{ connections: [0] } // Block 2 with connection to block 0
8888
]
8989
},
9090
errorMsg: jest.fn(),

js/utils/musicutils.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4612,19 +4612,19 @@ function getNote(
46124612
pitchNumber = Number(number);
46134613
} else {
46144614
pitchNumber = number;
4615+
}
4616+
break;
4617+
} else if (note === TEMPERAMENT[temperament][number][1]) {
4618+
if (typeof number === "string") {
4619+
pitchNumber = Number(number);
4620+
} else {
4621+
pitchNumber = number;
4622+
}
4623+
break;
46154624
}
4616-
break;
4617-
} else if (note === TEMPERAMENT[temperament][number][1]) {
4618-
if (typeof number === "string") {
4619-
pitchNumber = Number(number);
4620-
} else {
4621-
pitchNumber = number;
4622-
}
4623-
break;
46244625
}
46254626
}
46264627
}
4627-
}
46284628

46294629
if (pitchNumber === null || pitchNumber === "null") {
46304630
return getNote(

0 commit comments

Comments
 (0)