mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
fix(tui): prevent crash when theme search returns no results (#10565)
This commit is contained in:
parent
9407a6fd7c
commit
ebe86e40a0
@ -149,7 +149,8 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
||||
|
||||
function moveTo(next: number, center = false) {
|
||||
setStore("selected", next)
|
||||
props.onMove?.(selected()!)
|
||||
const option = selected()
|
||||
if (option) props.onMove?.(option)
|
||||
if (!scroll) return
|
||||
const target = scroll.getChildren().find((child) => {
|
||||
return child.id === JSON.stringify(selected()?.value)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user