Explorar o código

Combine !linkElement & !linkElement.href condition in isPreloadable

Alexandre Dieulot %!s(int64=6) %!d(string=hai) anos
pai
achega
1c527d9059
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  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
   }