Fix event params shadowing (0, false and so on -> {})

This commit is contained in:
Sergey Stepanov 2020-04-13 17:12:56 +03:00
parent 7f2f10518a
commit 9238e57acb
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B
2 changed files with 3 additions and 3 deletions

4
web/game.html vendored
View file

@ -31,7 +31,7 @@
</div>
<div id="bottom-screen">
<!--NOTE: New browser doesn't allow unmuted video player. So we muted here.
<!--NOTE: New browser doesn't allow unmuted video player. So we muted here.
There is still audio because current audio flow is not from media but it is manually encoded (technical webRTC challenge). Later, when we can integrate audio to media, we can face the issue with mute again .
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
-->
@ -90,7 +90,7 @@
<script src="/static/js/log.js?v=3"></script>
<script src="/static/js/env.js?v=3"></script>
<script src="/static/js/event/event.js?v=3"></script>
<script src="/static/js/event/event.js?v=4"></script>
<script src="/static/js/input/keys.js?v=3"></script>
<script src="/static/js/input/input.js?v=3"></script>
<script src="/static/js/gameList.js?v=3"></script>

View file

@ -48,7 +48,7 @@ const event = (() => {
if (!topics[topic] || topics[topic].length < 1) return;
topics[topic].forEach((listener) => {
listener.listener(data || {})
listener.listener(data !== undefined ? data : {})
});
}
}