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

This commit is contained in:
YeonGyu-Kim 2025-12-14 13:28:14 +09:00 committed by GitHub
parent 96975ef8d6
commit 210b3e905b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 {