Use === in JS
This commit is contained in:
parent
bad5fe3c22
commit
afc367cfb8
2 changed files with 6 additions and 6 deletions
|
|
@ -38,8 +38,8 @@ function afterKonami () {
|
|||
|
||||
// Register custom event
|
||||
document.addEventListener('keydown', (e) => {
|
||||
cursor = (e.keyCode == KONAMI_CODE[cursor]) ? cursor + 1 : 0
|
||||
if (cursor == KONAMI_CODE.length) {
|
||||
cursor = (e.keyCode === KONAMI_CODE[cursor]) ? cursor + 1 : 0
|
||||
if (cursor === KONAMI_CODE.length) {
|
||||
afterKonami()
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue