Skip to content

Commit

Permalink
Fixes #5534 by adding a check for null. (#5535)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamscs authored and perliedman committed Jun 1, 2017
1 parent da2c8ef commit 0b9464f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/layer/marker/Icon.Default.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ export var IconDefault = Icon.extend({

document.body.removeChild(el);

return path.indexOf('url') === 0 ?
path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '') : '';
if (path === null || path.indexOf('url') !== 0) {
path = '';
} else {
path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '');
}

return path;
}
});

0 comments on commit 0b9464f

Please sign in to comment.