From afc367cfb854b6f6db99676ad517f2ae3dd2865c Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sat, 5 Sep 2020 08:38:31 +0200 Subject: [PATCH] Use === in JS --- note_kfet/static/js/dynamic-formset.js | 8 ++++---- note_kfet/static/js/konami.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/note_kfet/static/js/dynamic-formset.js b/note_kfet/static/js/dynamic-formset.js index cb6151df..88d01eca 100644 --- a/note_kfet/static/js/dynamic-formset.js +++ b/note_kfet/static/js/dynamic-formset.js @@ -39,16 +39,16 @@ } var showAddButton = function () { - return maxForms.length == 0 || // For Django versions pre 1.2 - (maxForms.val() == '' || (maxForms.val() - totalForms.val() > 0)) + return maxForms.length === 0 || // For Django versions pre 1.2 + (maxForms.val() === '' || (maxForms.val() - totalForms.val() > 0)) } /** * Indicates whether delete link(s) can be displayed - when total forms > min forms */ var showDeleteLinks = function () { - return minForms.length == 0 || // For Django versions pre 1.7 - (minForms.val() == '' || (totalForms.val() - minForms.val() > 0)) + return minForms.length === 0 || // For Django versions pre 1.7 + (minForms.val() === '' || (totalForms.val() - minForms.val() > 0)) } var insertDeleteLink = function (row) { diff --git a/note_kfet/static/js/konami.js b/note_kfet/static/js/konami.js index 2b399b14..add7fb0b 100644 --- a/note_kfet/static/js/konami.js +++ b/note_kfet/static/js/konami.js @@ -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() } })