今天安卓说发现低版本的手机打不开我写的h5页面,看了他电脑上的运行日志发现了问题,Uncaught TypeError: Object.assign is not a function
1
08-0910:28:50.0118628-8628/com.cheezgroup.tosharing.intl I/chromium: [INFO:CONSOLE(41480)] "Uncaught TypeError: Object.assign is not a function", source: http://192.168.1.16:3000/_next/static/development/pages/_app.js?ts=1565317716331 (41480)
if (typeofObject.assign !== "function") { Object.assign = function(target) { "use strict"; if (target === null) { // TypeError if undefined or null thrownewTypeError("Cannot convert undefined or null to object"); }
var to = Object(target);
for (var index = 1; index < arguments.length; index++) { var nextSource = arguments[index];
if (nextSource !== null) { // Skip over if undefined or null for (var nextKey in nextSource) { // Avoid bugs when hasOwnProperty is shadowed if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { to[nextKey] = nextSource[nextKey]; } } } } return to; }; }
if (!Object.prototype.assign || typeofObject.assign !== "function") { Object.assign = function(target) { "use strict"; if (target === null) { // TypeError if undefined or null thrownewTypeError("Cannot convert undefined or null to object"); }
var to = Object(target);
for (var index = 1; index < arguments.length; index++) { var nextSource = arguments[index];
if (nextSource !== null) { // Skip over if undefined or null for (var nextKey in nextSource) { // Avoid bugs when hasOwnProperty is shadowed if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { to[nextKey] = nextSource[nextKey]; } } } } return to; }; }