You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consthandler=(key)=>{alt.log("keydown",key)listenKeydown()}constlistenKeydown=()=>{const[listener]=alt.getEventListeners("keydown")alt.log("keydown listener:",listener)if(listener){alt.log("alt.off keydown with invalid function ref")alt.off("keydown",()=>{})}else{alt.log("alt.on keydown")alt.on("keydown",handler)}}listenKeydown()
Expected behaviour
Maybe we should check if passed function reference is not valid and throw error?
Additional context
No response
Operating system
Windows 11
Version
13.0-rc2
Scope
shared
Reproduction tested
I confirm that I have made sure that this issue is also present on the newest dev version
The text was updated successfully, but these errors were encountered:
Description of the problem
See reproduction code.
Reproduction steps
Expected behaviour
Maybe we should check if passed function reference is not valid and throw error?
Additional context
No response
Operating system
Windows 11
Version
13.0-rc2
Scope
shared
Reproduction tested
The text was updated successfully, but these errors were encountered: