2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-22 01:47:48 +00:00

Can just clear instead of reassign

This commit is contained in:
nanaya 2024-12-08 21:37:39 +09:00
parent 9fc64a252e
commit 7d9a33ce11

View File

@ -17,7 +17,7 @@ keysDown = new Map
# Many browsers eat keyup events if focus is lost while the button
# is pressed.
document.addEventListener 'blur', ->
keysDown = new Map
keysDown.clear()
window.OnKey = (key, options, press, release) ->
options ?= {}