Skip to content

Commit

Permalink
Add some missing checks to prevent errors in IE8. Fix #9
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 13, 2015
1 parent 9b275c8 commit 9652d75
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugins/jsonp-highlight/prism-jsonp-highlight.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function() {
if ( !self.Prism || !self.document || !document.querySelectorAll ) return;
if ( !self.Prism || !self.document || !document.querySelectorAll || ![].filter) return;

var adapters = [];
function registerAdapter(adapter) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/jsonp-highlight/prism-jsonp-highlight.min.js

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

4 changes: 3 additions & 1 deletion plugins/line-highlight/prism-line-highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ Prism.hooks.add('complete', function(env) {
fakeTimer = setTimeout(applyHash, 1);
});

addEventListener('hashchange', applyHash);
if(window.addEventListener) {
window.addEventListener('hashchange', applyHash);
}

})();
2 changes: 1 addition & 1 deletion plugins/line-highlight/prism-line-highlight.min.js

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

2 changes: 1 addition & 1 deletion plugins/previewer-base/prism-previewer-base.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

if (typeof self === 'undefined' || !self.Prism || !self.document) {
if (typeof self === 'undefined' || !self.Prism || !self.document || !Function.prototype.bind) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/previewer-base/prism-previewer-base.min.js

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

0 comments on commit 9652d75

Please sign in to comment.