Kaynağa Gözat

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

Fix for NaN comparison
Alexandre Dieulot 5 yıl önce
ebeveyn
işleme
a9cd8c5825
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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
     }
   }