fix(core): check if listener.handler is undefined (#10007)

This commit is contained in:
Yasunari Fujieda 2024-06-13 01:32:06 +09:00 committed by GitHub
parent c98f385cb5
commit 4ca297b35b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -231,7 +231,7 @@ pub fn event_initialization_script(function: &str, listeners: &str) -> String {
const listeners = (window['{listeners}'] && window['{listeners}'][eventData.event]) || []
for (const id of ids) {{
const listener = listeners[id]
if (listener) {{
if (listener && listener.handler) {{
eventData.id = id
listener.handler(eventData)
}}