diff --git a/lib/gltfPrimitiveToCesiumGeometry.js b/lib/gltfPrimitiveToCesiumGeometry.js index c3cf4908..4ce5d5bd 100644 --- a/lib/gltfPrimitiveToCesiumGeometry.js +++ b/lib/gltfPrimitiveToCesiumGeometry.js @@ -15,10 +15,11 @@ module.exports = gltfPrimitiveToCesiumGeometry; function unpackArray(values) { var length = values.data.length; var packed; + var i; switch (values.type) { case 'Cartesian2': packed = new Array(length * 2); - for (var i = 0; i < length; ++i) { + for (i = 0; i < length; ++i) { Cartesian2.pack(values.data[i], packed, i * 2); } return packed;