bug fix
This commit is contained in:
parent
33a73c37bc
commit
a4f10d5339
2 changed files with 4 additions and 4 deletions
|
|
@ -33,10 +33,10 @@ describe('tonal', () => {
|
|||
it('scale with n and note values', () => {
|
||||
expect(
|
||||
n(0, 1, 2)
|
||||
.note(3, 4, 5)
|
||||
.note(3, 4, 0)
|
||||
.scale('C major')
|
||||
.firstCycleValues.map((h) => h.note),
|
||||
).toEqual(['F3', 'G3', 'A3']);
|
||||
.firstCycleValues.map((h) => [h.n, h.note]),
|
||||
).toEqual([[0, 'F3'], [1, 'G3'], [2, 'C3']]);
|
||||
});
|
||||
it('scale with colon', () => {
|
||||
expect(
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ export const scale = register(
|
|||
const isObject = typeof value === 'object';
|
||||
let step = value;
|
||||
if (isObject) {
|
||||
if (value.note) {
|
||||
if (typeof value.note !== 'undefined') {
|
||||
step = value.note;
|
||||
} else {
|
||||
step = value.n;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue