File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1612,4 +1612,36 @@ if (!String.prototype.padEnd) {
16121612 } ;
16131613}
16141614
1615+ // Object.assign polyfill for IE11
1616+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
1617+ if ( typeof Object . assign !== 'function' ) {
1618+ // Must be writable: true, enumerable: false, configurable: true
1619+ Object . defineProperty ( Object , "assign" , {
1620+ value : function assign ( target , varArgs ) { // .length of function is 2
1621+ 'use strict' ;
1622+ if ( target === null || target === undefined ) {
1623+ throw new TypeError ( 'Cannot convert undefined or null to object' ) ;
1624+ }
1625+
1626+ var to = Object ( target ) ;
1627+
1628+ for ( var index = 1 ; index < arguments . length ; index ++ ) {
1629+ var nextSource = arguments [ index ] ;
1630+
1631+ if ( nextSource !== null && nextSource !== undefined ) {
1632+ for ( var nextKey in nextSource ) {
1633+ // Avoid bugs when hasOwnProperty is shadowed
1634+ if ( Object . prototype . hasOwnProperty . call ( nextSource , nextKey ) ) {
1635+ to [ nextKey ] = nextSource [ nextKey ] ;
1636+ }
1637+ }
1638+ }
1639+ }
1640+ return to ;
1641+ } ,
1642+ writable : true ,
1643+ configurable : true
1644+ } ) ;
1645+ }
1646+
16151647/* jshint ignore:end */
You can’t perform that action at this time.
0 commit comments