includes to indexof

This commit is contained in:
2025-05-28 19:07:37 +08:00
parent a7df8ec739
commit ccfcc4f840
3 changed files with 6 additions and 3 deletions

View File

@@ -43,7 +43,8 @@ export class DOBlock {
}
public add_note(noteNumber: number): void {
if (!this.data.notes.includes(noteNumber)) {
const find = this.data.notes.indexOf(noteNumber)
if (find < 0) {
this.data.notes.push(noteNumber)
StorageManager.getInstance().onStageChanged()
}