Skip to content

Commit

Permalink
Update timeline.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih authored Aug 15, 2024
1 parent e3770de commit e8d3d7b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/frontend/src/pages/timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import { deepMerge } from '@/scripts/merge.js';
import { MenuItem } from '@/types/menu.js';
import { miLocalStorage } from '@/local-storage.js';
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
import type { BasicTimelineType } from '@/timelines.js';

provide('shouldOmitHeaderTitle', true);

Expand Down Expand Up @@ -240,11 +239,7 @@ function closeTutorial(): void {
}

function switchTlIfNeeded() {
function isNotInList(src: TimelinePageSrc): src is Exclude<TimelinePageSrc, `list:${string}`> {
return !src.startsWith('list:');
}

if (isNotInList(src.value) && !availableBasicTimelines().includes(src.value)) {
if (isBasicTimeline(src.value) && !availableBasicTimelines().includes(src.value)) {
src.value = availableBasicTimelines()[0];
}
}
Expand Down

0 comments on commit e8d3d7b

Please sign in to comment.