You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the optimizer doesn't resolve to URLs, the check to see if a <link> already exists in the page will always be falsey. The fix is to use either URL() or <a> to get the href relative to the page, and use that as the check.
The text was updated successfully, but these errors were encountered:
doing some debugging, it happens b/c document.styleSheets comes out empty each time the css slim plugin is called (even tho there are links already on the header, not sure why)
Was able to replicate in Safari but not Firefox (guessing that's why the tests didn't caught it)
Chrome/Safari seem to wait until the link tag has finished loading to
add it to `document.styleSheets` and that causes the slim loader to
duplicate the link tag.
Using `document.querySelectorAll` works fine in the three browsers
Closes#64
Because the optimizer doesn't resolve to URLs, the check to see if a
<link>
already exists in the page will always be falsey. The fix is to use eitherURL()
or<a>
to get the href relative to the page, and use that as the check.The text was updated successfully, but these errors were encountered: