diff --git a/src/core/platform/web/function.js b/src/core/platform/web/function.js index 8e7f69d35..ad972d713 100644 --- a/src/core/platform/web/function.js +++ b/src/core/platform/web/function.js @@ -105,6 +105,10 @@ _.extend(BI, { humpString = [], htmlStyle = document.documentElement.style, _toHumb = function (string) { + if (!BI.isString(string)) { + return ""; + } + return string.replace(/-(\w)/g, function ($0, $1) { return $1.toUpperCase(); }); diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 550923d0b..cefc1885f 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -10,7 +10,16 @@ module.exports = { fineui: [ ...isBuilt4IE8 ? [ - "core-js", + "core-js/features/object/define-property", + "core-js/features/object/create", + "core-js/features/object/assign", + "core-js/features/array/for-each", + "core-js/features/array/index-of", + "core-js/features/function/bind", + "core-js/features/promise", + "core-js/features/object/get-own-property-symbols", + "core-js/features/string/replace", + // "core-js", ] : [ "@babel/polyfill",