Skip to content

Commit 6933429

Browse files
committed
refactor: we don't need this line
as this only results in null in case that the attribute doesn't exist
1 parent 20b856b commit 6933429

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

loading-attribute-polyfill.sw.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ self.addEventListener('fetch', (event) => {
22
const requestURLParameters = new URL(event.request.url).searchParams;
33
const swURLSearchparams = new URL(self.location.href).searchParams;
44

5-
if (
6-
requestURLParameters.get('loading') &&
7-
requestURLParameters.get('loading') === 'lazy'
8-
) {
5+
if (requestURLParameters.get('loading') === 'lazy') {
96
if (event.request.destination === 'document') {
107
if (swURLSearchparams.get('loading-iframes') !== 'true') {
118
event.respondWith(

0 commit comments

Comments
 (0)