Skip to content

Commit

Permalink
address PR review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Feb 23, 2023
1 parent 5b660cc commit f09a965
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/browser/src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

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

0 comments on commit f09a965

Please sign in to comment.