Skip to content

Commit

Permalink
Fix merge issue. Remove instanceof.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronyeh committed Aug 29, 2021
1 parent 9ce76f3 commit 1782114
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/accidental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Voice } from './voice';
import { Note } from './note';
import { StaveNote } from './stavenote';
import { Tickable } from './tickable';
import { isStaveNote } from './typeguard';
import { isCategory, isStaveNote } from './typeguard';

type Line = {
column: number;
Expand Down Expand Up @@ -433,13 +433,13 @@ export class Accidental extends Modifier {
const previouslyModified = modifiedPitches.indexOf(pitch) > -1;

// Remove accidentals
note.getModifiers().forEach(function (modifier, index) {
staveNote.getModifiers().forEach((modifier, index) => {
if (
modifier instanceof Accidental &&
isCategory(modifier, Accidental) &&
modifier.type == accidentalString &&
modifier.getIndex() == keyIndex
) {
note.getModifiers().splice(index, 1);
staveNote.getModifiers().splice(index, 1);
}
});

Expand Down

0 comments on commit 1782114

Please sign in to comment.