Set offset to 0 if attribute not present

This commit is contained in:
Andrea Bogazzi 2015-08-12 14:18:50 +02:00
parent b24f211dfa
commit 37acc8a602

View file

@ -3,7 +3,7 @@
/* _FROM_SVG_START_ */
function getColorStop(el) {
var style = el.getAttribute('style'),
offset = el.getAttribute('offset'),
offset = el.getAttribute('offset') || 0,
color, colorAlpha, opacity;
// convert percents to absolute values