Skip to content

Commit e98861a

Browse files
committed
Fix "Show more" versions
1 parent 5c77276 commit e98861a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/components/VersionSwitcher.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useMemo, useState } from 'preact/hooks'
22
import config from '../Config.js'
3-
import { Store } from '../Store.js'
43
import { useLocale } from '../contexts/index.js'
54
import type { VersionId } from '../services/index.js'
5+
import { Store } from '../Store.js'
66
import { Btn } from './Btn.js'
77
import { BtnMenu } from './BtnMenu.js'
88

@@ -29,7 +29,7 @@ export function VersionSwitcher({ value, allowed, hasAny, onChange, onAny }: Pro
2929

3030
const hasMoreVersions = useMemo(() => {
3131
return versions.some(v => !(v.show || v.id === value))
32-
}, [])
32+
}, [versions, value])
3333

3434
const shownVersions = useMemo(() => {
3535
return versions.filter(v => v.show || v.id === value || showMore)

0 commit comments

Comments
 (0)