Skip to content

Commit

Permalink
Fixed IE bug
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWorld017 committed Feb 26, 2017
1 parent bc79917 commit 7c0986e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "origami",
"description": "Origami: a fancy ghost theme",
"demo": "https://blog.khinenw.tk",
"version": "1.2.0",
"version": "1.3.0",
"engines": {
"ghost": ">=0.9.0 <1.0.0"
},
Expand Down Expand Up @@ -47,12 +47,12 @@
"webpack-dev-server": "^2.3.0"
},
"dependencies": {
"babel-polyfill": "^6.23.0",
"clipboard": "^1.6.0",
"downsize": "0.0.8",
"fitvids": "^2.0.0",
"mdi": "^1.8.36",
"prismjs": "^1.6.0",
"promise-polyfill": "^6.0.2",
"resolve-url": "^0.2.1",
"vue": "^2.1.10",
"whatwg-fetch": "^2.0.2"
Expand Down
9 changes: 5 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import "./index.less";

//Polyfills
import Promise from 'promise-polyfill';
/*import Promise from 'promise-polyfill';
if (!window.Promise) {
window.Promise = Promise;
}
}*/
import "babel-polyfill";
import "whatwg-fetch";

//Vue
Expand Down Expand Up @@ -60,7 +61,7 @@ new Clipboard('[data-origami-link]', {
});

window.addEventListener('load', () =>{
$$('pre[class*="language-"]').forEach((v) => {
v.setAttribute('data-lang', v.className.split(' ').find((v) => v.startsWith('language-')))
Array.prototype.forEach.call($$('pre[class*="language-"]'), (v) => {
v.setAttribute('data-lang', v.className.split(' ').find((v) => v.startsWith('language-')));
});
});

0 comments on commit 7c0986e

Please sign in to comment.