From c934821078fecfb6a7bec8282aad6d5889835c1c Mon Sep 17 00:00:00 2001 From: iapyang Date: Mon, 28 Oct 2019 10:20:36 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20get-prototype=E9=87=87=E7=94=A8core-js?= =?UTF-8?q?=E7=9A=84polyfill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/polyfill/lodash.js | 2 ++ webpack/webpack.common.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/polyfill/lodash.js b/src/polyfill/lodash.js index 088577025..88be39f0f 100644 --- a/src/polyfill/lodash.js +++ b/src/polyfill/lodash.js @@ -30,6 +30,7 @@ if (!Array.isArray) { }; } +/* 统一采用core-js的polyfill,此块暂去 // https://stackoverflow.com/questions/10919915/ie8-getprototypeof-method if (typeof Object.getPrototypeOf !== "function") { Object.getPrototypeOf = "".__proto__ === String.prototype @@ -41,6 +42,7 @@ if (typeof Object.getPrototypeOf !== "function") { return object.constructor.prototype; }; } + */ if(!Date.now) { Date.now = function () { diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 51cf4f264..c51b2d88a 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -13,6 +13,7 @@ module.exports = { "core-js/features/object/create", "core-js/features/object/assign", "core-js/features/object/get-own-property-symbols", + "core-js/features/object/get-prototype-of", "core-js/features/array/for-each", "core-js/features/array/index-of", "core-js/features/function/bind",