Fixes #5534 by adding a check for null. (#5535)

This commit is contained in:
Chris Williams 2017-06-01 10:20:08 -05:00 committed by Per Liedman
parent da2c8ef2db
commit 0b9464f017

View File

@ -49,7 +49,12 @@ export var IconDefault = Icon.extend({
document.body.removeChild(el); document.body.removeChild(el);
return path.indexOf('url') === 0 ? if (path === null || path.indexOf('url') !== 0) {
path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '') : ''; path = '';
} else {
path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '');
}
return path;
} }
}); });