Skip to content

Commit

Permalink
Remove self & document from IIFE arguments (#2258)
Browse files Browse the repository at this point in the history
If self or document don't exist, they'll error instead of getting to the
checks.

Fixes #2257.
  • Loading branch information
mAAdhaTTah authored Mar 21, 2020
1 parent 328d0e0 commit 3c04333
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/keep-markup/prism-keep-markup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function (self, document) {
(function () {

if (typeof self === 'undefined' || !self.Prism || !self.document || !document.createRange) {
return;
Expand Down Expand Up @@ -96,4 +96,4 @@
env.highlightedCode = env.element.innerHTML;
}
});
}(self, document));
}());
2 changes: 1 addition & 1 deletion plugins/keep-markup/prism-keep-markup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c04333

Please sign in to comment.