Преглед на файлове

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

Fix for NaN comparison
Alexandre Dieulot преди 5 години
родител
ревизия
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
     }
   }