Godofbrowser/vuejs-dialog

Internet Explorer 11 incompatible

hungnv-sr opened this issue · 2 comments

I haven't try with other version of IE, and I tried to upgrade windows and IE but no luck so far.
Error:
SCRIPT5007: Unable to get property 'apply' of undefined or null reference
line 668 in vuejs-dialog.min.js
I tried babel polyfill but still get the error.

I faced the same issue. Any solutions?

I faced this issue and solved it by including a polyfill for Object.assign before loading vuejs-dialog.

if (typeof Object.assign !== 'function') {
  // Must be writable: true, enumerable: false, configurable: true
  Object.defineProperty(Object, "assign", {
    value: function assign(target, varArgs) { // .length of function is 2
      'use strict';
      if (target === null || target === undefined) {
        throw new TypeError('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 && nextSource !== undefined) {
          for (var nextKey in nextSource) {
            // Avoid bugs when hasOwnProperty is shadowed
            if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
              to[nextKey] = nextSource[nextKey];
            }
          }
        }
      }
      return to;
    },
    writable: true,
    configurable: true
  });
}

import VuejsDialog from 'vuejs-dialog';
window.Vue.use(VuejsDialog);