As it is currently written, it is not possible to reassign the const variable i, resulting in an error. Since i is incremented within the loop, it should be declared as let instead of const.
if ( isMatrixType( type ) ) {
const elements = target.elements;
- for ( const i = 0, l = elements.length; i < l; i ++ ) {
+ for ( let i = 0, l = elements.length; i < l; i ++ ) {
elements[ i ] = value[ i ];
}
}
Description
In the file src/three/gltf/classes/PropertySetAccessor.js, at line 194, in the
resolveDefault
function, thefor
loop variablei
is incorrectly declared asconst
.As it is currently written, it is not possible to reassign the
const
variablei
, resulting in an error. Sincei
is incremented within the loop, it should be declared aslet
instead ofconst
.