Skip to content

Commit df4cbe2

Browse files
execute this.bootstrap only if defined
1 parent 039b888 commit df4cbe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/content/content-bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function getContent() {
117117

118118
function executeBootstrap(data) {
119119
const scriptElement = document.createElement("script");
120-
scriptElement.textContent = "(() => { const bootstrapReady = this.bootstrap([" + (new Uint8Array(data)).toString() + "]); if (bootstrapReady) { bootstrapReady.then(() => document.dispatchEvent(new CustomEvent(\"single-filez-display-infobar\"))); } })()";
120+
scriptElement.textContent = "(() => { const bootstrapReady = this.bootstrap && this.bootstrap([" + (new Uint8Array(data)).toString() + "]); if (bootstrapReady) { bootstrapReady.then(() => document.dispatchEvent(new CustomEvent(\"single-filez-display-infobar\"))); } })()";
121121
document.body.appendChild(scriptElement);
122122
}
123123

0 commit comments

Comments
 (0)