Просмотр исходного кода

Merge pull request #46 from alexandrvicente/fix-NaN-comparison

Fix for NaN comparison
Alexandre Dieulot 5 лет назад
Родитель
Сommit
a9cd8c5825
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      instantpage.js

+ 1 - 1
instantpage.js

@@ -23,7 +23,7 @@ if ('instantIntensity' in document.body.dataset) {
   }
   else {
     const milliseconds = parseInt(document.body.dataset.instantIntensity)
-    if (milliseconds != NaN) {
+    if (!isNaN(milliseconds)) {
       delayOnHover = milliseconds
     }
   }