We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d9d604 commit 2836e49Copy full SHA for 2836e49
src/npm-fastui/src/events.ts
@@ -89,6 +89,11 @@ interface EventDetails {
89
}
90
91
export function usePageEventListen(event?: PageEvent, initialContext: ContextType | null = null): EventDetails {
92
+ if (initialContext === null) {
93
+ if (event?.context !== null) {
94
+ initialContext = event?.context!
95
+ }
96
97
const [eventContext, setEventContext] = useState<ContextType | null>(initialContext)
98
const [fireId, setFireId] = useState<string | null>(null)
99
0 commit comments