mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 23:39:59 -05:00
Fix index lookup in getValue().
This commit is contained in:
parent
3c88614a86
commit
6937d4c3be
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ var SvgImporter = this.SvgImporter = new function() {
|
||||||
function getValue(svg, key, index) {
|
function getValue(svg, key, index) {
|
||||||
var base = svg[key].baseVal;
|
var base = svg[key].baseVal;
|
||||||
return index !== undefined
|
return index !== undefined
|
||||||
? base.numberOfItems > 0 ? base.getItem(index).value || 0 : 0
|
? index < base.numberOfItems ? base.getItem(index).value || 0 : 0
|
||||||
: base.value || 0;
|
: base.value || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue