Unverified Commit a04a5f01 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Remove extra DOM method call (#8394)

parent cbe70e95
front @ b7e21d6d
Subproject commit b7e21d6de6110ac8a969b53dc9ad11d80aa49eba
...@@ -233,8 +233,9 @@ export default class PageLoader { ...@@ -233,8 +233,9 @@ export default class PageLoader {
// n.b. If preload is not supported, we fall back to `loadPage` which has // n.b. If preload is not supported, we fall back to `loadPage` which has
// its own deduping mechanism. // its own deduping mechanism.
if ( if (
document.querySelector(`link[rel="preload"][href^="${url}"]`) || document.querySelector(
document.querySelector(`script[data-next-page="${route}"]`) `link[rel="preload"][href^="${url}"], script[data-next-page="${route}"]`
)
) { ) {
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment