Skip to content

Commit

Permalink
Change: === undefinedを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Nov 24, 2023
1 parent b178ea3 commit 87dfdec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/AudioDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const accentPhraseComponents = ref<InstanceType<typeof AccentPhrase>[]>([]);
const scrollToActivePoint = () => {
if (
activePoint.value === undefined ||
activePoint.value == undefined ||
!audioDetail.value ||
accentPhraseComponents.value.length === 0
)
Expand Down Expand Up @@ -323,7 +323,7 @@ watch(nowPlaying, async (newState) => {
// それに合わせてフォーカスするアクセント句を変えていく
const focusAccentPhrase = () => {
const currentTime = store.getters.ACTIVE_AUDIO_ELEM_CURRENT_TIME;
if (currentTime === undefined) {
if (currentTime == undefined) {
throw new Error("currentTime === undefined)");
}
const playingAccentPhraseIndex =
Expand All @@ -346,13 +346,13 @@ watch(nowPlaying, async (newState) => {
requestId = window.requestAnimationFrame(focusAccentPhrase);
};
requestId = window.requestAnimationFrame(focusAccentPhrase);
} else if (requestId !== undefined) {
} else if (requestId != undefined) {
window.cancelAnimationFrame(requestId);
requestId = undefined;
// startPointがundefinedの場合、一旦最初のアクセント句までスクロール、その後activePointの選択を解除(undefinedに)する
activePoint.value = startPoint.value ?? 0;
scrollToActivePoint();
if (startPoint.value === undefined) activePoint.value = startPoint.value;
if (startPoint.value == undefined) activePoint.value = startPoint.value;
}
});
Expand Down

0 comments on commit 87dfdec

Please sign in to comment.