Skip to content

Commit 1bad0f4

Browse files
committed
Backport the prism v1.30.0 fix
1 parent 44bd980 commit 1bad0f4

File tree

1 file changed

+1
-1
lines changed
  • wcfsetup/install/files/js/3rdParty/prism

1 file changed

+1
-1
lines changed

wcfsetup/install/files/js/3rdParty/prism/prism.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ var _ = {
185185
if (typeof document === 'undefined') {
186186
return null;
187187
}
188-
if ('currentScript' in document && 1 < 2 /* hack to trip TS' flow analysis */) {
188+
if (document.currentScript && document.currentScript.tagName === 'SCRIPT' && 1 < 2 /* hack to trip TS' flow analysis */) {
189189
return /** @type {any} */ (document.currentScript);
190190
}
191191

0 commit comments

Comments
 (0)