Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

"Object doesn't support property or method 'assign'" From Internet Explorer #41

Closed
matthewtdemery opened this issue Sep 11, 2020 · 3 comments

Comments

@matthewtdemery
Copy link

....it's 6AM and I need sleep. The script works perfectly in Firefox, Opera, and Chrome. But IE11? Nope! I don't blame you or your coding. I blame those knucks down in Redmond who refuse to work together with the rest of us. Productivity never trumps profit. goodnight :)

@jsanahuja
Copy link
Owner

I don't have Internet Explorer so feel free to send a pull request with the changes to get it working for IE 11

@reynoldspaul
Copy link

@matthewtdemery found a solution - need a polyfill for IE https://stackoverflow.com/a/39021339/11770149

if (typeof Object.assign != 'function') {
  Object.assign = function(target) {
    'use strict';
    if (target == null) {
      throw new TypeError('Cannot convert undefined or null to object');
    }

    target = Object(target);
    for (var index = 1; index < arguments.length; index++) {
      var source = arguments[index];
      if (source != null) {
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
    }
    return target;
  };
}

Fixes it for me on IE

@jsanahuja
Copy link
Owner

Should be fixed as of the 2.0.2 release.

Thanks @RaiserWeb

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants