Skip to content

Commit f09a965

Browse files
committed
address PR review feedback
1 parent 5b660cc commit f09a965

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/browser/src/loader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717

1818
for (var i = 0; i < document.scripts.length; i++) {
1919
if (document.scripts[i].src.indexOf(_publicKey) > -1) {
20-
lazy = !(document.scripts[i].getAttribute('data-lazy') === 'no');
20+
// If lazy was set to true above, we need to check if the user has set data-lazy="no"
21+
// to confirm that we should lazy load the CDN bundle
22+
if (lazy && document.scripts[i].getAttribute('data-lazy') === 'no') {
23+
lazy = false;
24+
}
2125
break;
2226
}
2327
}

0 commit comments

Comments
 (0)