ソースを参照

Combine !linkElement & !linkElement.href condition in isPreloadable

Alexandre Dieulot 6 年 前
コミット
1c527d9059
1 ファイル変更1 行追加5 行削除
  1. 1 5
      instantpage.js

+ 1 - 5
instantpage.js

@@ -81,11 +81,7 @@ function mouseoutListener(event) {
 }
 
 function isPreloadable(linkElement) {
-  if (!linkElement) {
-    return
-  }
-
-  if (!linkElement.href) {
+  if (!linkElement || !linkElement.href) {
     return
   }