Skip to content

Commit

Permalink
Fix: deepを外す
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Oct 30, 2024
1 parent 24eea03 commit 4798205
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/Sing/ToolBar/ToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<template #control>
<div class="sing-beats">
<QSelect
:modelValue="lastTimeSignature.beats"
:modelValue="currentTimeSignature.beats"
:options="beatsOptions"
hideBottomSpace
hideDropdownIcon
Expand All @@ -73,7 +73,7 @@
/>
<div class="sing-beats-separator">/</div>
<QSelect
:modelValue="lastTimeSignature.beatType"
:modelValue="currentTimeSignature.beatType"
:options="beatTypeOptions"
hideBottomSpace
hideDropdownIcon
Expand Down Expand Up @@ -295,7 +295,7 @@ const setBpmInputBuffer = (bpmStr: string | number | null) => {
bpmInputBuffer.value = bpmValue;
};
const lastTimeSignature = computed(() => {
const currentTimeSignature = computed(() => {
const maybeTimeSignature = timeSignatures.value.findLast(
(_timeSignature, i) => tsPositions.value[i] <= playheadTicks.value,
);
Expand All @@ -312,9 +312,9 @@ const setBeats = (beats: { label: string; value: number }) => {
void store.actions.COMMAND_SET_TIME_SIGNATURE({
timeSignature: {
measureNumber: lastTimeSignature.value.measureNumber,
measureNumber: currentTimeSignature.value.measureNumber,
beats: beats.value,
beatType: lastTimeSignature.value.beatType,
beatType: currentTimeSignature.value.beatType,
},
});
};
Expand All @@ -325,8 +325,8 @@ const setBeatType = (beatType: { label: string; value: number }) => {
}
void store.actions.COMMAND_SET_TIME_SIGNATURE({
timeSignature: {
measureNumber: lastTimeSignature.value.measureNumber,
beats: lastTimeSignature.value.beats,
measureNumber: currentTimeSignature.value.measureNumber,
beats: currentTimeSignature.value.beats,
beatType: beatType.value,
},
});
Expand Down Expand Up @@ -387,15 +387,15 @@ const setVolumeRangeAdjustment = () => {
watch(
[tempos, playheadTicks],
() => {
const lastTempo = tempos.value.findLast(
const currentTempo = tempos.value.findLast(
(tempo) => tempo.position <= playheadTicks.value,
);
if (!lastTempo) {
if (!currentTempo) {
throw new UnreachableError("assert: at least one tempo exists");
}
bpmInputBuffer.value = lastTempo.bpm;
bpmInputBuffer.value = currentTempo.bpm;
},
{ deep: true, immediate: true },
{ immediate: true },
);
const nowPlaying = computed(() => store.state.nowPlaying);
Expand Down

0 comments on commit 4798205

Please sign in to comment.