fix(ui): guard Node reference for SSR compatibility in isTriggerTitle (#5509)

thinking-toggle-wip
YeonGyu-Kim 2025-12-14 13:28:14 +09:00 committed by Aiden Cline
parent 2980eff805
commit e59d479947
1 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,9 @@ export type TriggerTitle = {
}
const isTriggerTitle = (val: any): val is TriggerTitle => {
return typeof val === "object" && val !== null && "title" in val && !(val instanceof Node)
return (
typeof val === "object" && val !== null && "title" in val && (typeof Node === "undefined" || !(val instanceof Node))
)
}
export interface BasicToolProps {