Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE Object.assign not available #47

Open
stanleynguyen opened this issue Oct 28, 2019 · 1 comment
Open

IE Object.assign not available #47

stanleynguyen opened this issue Oct 28, 2019 · 1 comment

Comments

@stanleynguyen
Copy link
Contributor

Object.assign is not available on IE. The fix is simple as only a polyfill is necessary

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;
  };
}
@Cam
Copy link
Member

Cam commented Nov 13, 2019

@stanleynguyen nice one. Personally I don't think we should change the package to support IE. But I'd like to keep this issue open, and possible pinned, so that others can implement support for IE as necessary.

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

No branches or pull requests

2 participants