Skip to content

Commit

Permalink
マルチトラック:複数選択が出来ないのを修正 (#2186)
Browse files Browse the repository at this point in the history
Fix: 複数選択が出来ないのを修正
  • Loading branch information
sevenc-nanashi authored Jul 30, 2024
1 parent ef16660 commit d5f6825
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/store/singing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,11 @@ export const singingStore = createPartialStore<SingingStoreTypes>({
selectedTrack.notes.map((note) => note.id),
);

// toRawを1回挟まないとintersectionがエラーを返す
return toRaw(state._selectedNoteIds).intersection(noteIdsInSelectedTrack);
// そのままSet#intersectionを呼ぶとVueのバグでエラーになるため、new Set()でProxyなしのSetを作成する
// TODO: https://github.com/vuejs/core/issues/11398 が解決したら修正する
return new Set(state._selectedNoteIds).intersection(
noteIdsInSelectedTrack,
);
},
},

Expand Down

0 comments on commit d5f6825

Please sign in to comment.