Skip to content

Commit

Permalink
fixed loading in ie11 (#5307)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Oct 14, 2018
1 parent 839b54a commit 38999b8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@
*/
function parseUseDirectives(doc) {
var nodelist = _getMultipleNodes(doc, ['use', 'svg:use']), i = 0;

while (nodelist.length && i < nodelist.length) {
var el = nodelist[i],
xlink = (el.getAttribute('xlink:href') || el.getAttribute('href')).substr(1),
Expand Down
20 changes: 1 addition & 19 deletions src/util/dom_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,6 @@
return url + (/\?/.test(url) ? '&' : '?') + param;
}

var makeXHR = (function() {
var factories = [
function() { return new fabric.window.XMLHttpRequest(); },
function() { return new ActiveXObject('Microsoft.XMLHTTP'); },
function() { return new ActiveXObject('Msxml2.XMLHTTP'); },
function() { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); }
];
for (var i = factories.length; i--; ) {
try {
var req = factories[i]();
if (req) {
return factories[i];
}
}
catch (err) { }
}
})();

function emptyFn() { }

/**
Expand All @@ -40,7 +22,7 @@

var method = options.method ? options.method.toUpperCase() : 'GET',
onComplete = options.onComplete || function() { },
xhr = makeXHR(),
xhr = new fabric.window.XMLHttpRequest(),
body = options.body || options.parameters;

/** @ignore */
Expand Down
2 changes: 1 addition & 1 deletion src/util/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
*/
groupSVGElements: function(elements, options, path) {
var object;
if (elements.length === 1) {
if (elements && elements.length === 1) {
return elements[0];
}
if (options) {
Expand Down

0 comments on commit 38999b8

Please sign in to comment.