Skip to content

Commit

Permalink
fix for PD-234259 console error
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantbazaarvoice committed Mar 25, 2024
1 parent d9b40ba commit cc2e001
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/loader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ module.exports = {
done = true;
clearTimeout(timeoutHandle);
script.onload = script.onreadystatechange = script.onerror = null;
script.parentNode.removeChild(script);

if (script && script.parentNode) {
script.parentNode.removeChild(script);
}
if (!err) {
_loadedUrls[url] = true;

Expand Down

0 comments on commit cc2e001

Please sign in to comment.