From 7c0986e19f5b890d3a23491a79d6ccc23fed9c74 Mon Sep 17 00:00:00 2001 From: HelloWorld017 Date: Sun, 26 Feb 2017 22:56:56 +0900 Subject: [PATCH] Fixed IE bug --- package.json | 4 ++-- src/index.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 65f784e..f1b94b0 100644 --- a/package.json +++ b/package.json @@ -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" }, @@ -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" diff --git a/src/index.js b/src/index.js index 8146d5d..a3d299d 100644 --- a/src/index.js +++ b/src/index.js @@ -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 @@ -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-'))); }); });