angus-c/es6-react-mixins

Object.assign in lib/mixin.js

tomatau opened this issue · 1 comments

The built lib/mixin file includes a call to Object.assign which isn't available on most browsers. I thought babel provided a polyfill automatically for this - but it's definitely in your lib code.

var noop = function noop() {};
var es6ify = function es6ify(mixin) {
  if (typeof mixin === 'function') {
    // mixin is already es6 style
    return mixin;
  }
  return function (Base) {
  // ...
    })(Base);

    Object.assign(NewClass.prototype, mixin);
    return NewClass;
  };
};

May need to build with this? https://github.com/JedWatson/babel-plugin-object-assign/blob/master/index.js

thanks for catching this @tomatau
fixed by compiling with runtime option