diff --git a/src/renderers/common/RenderObject.js b/src/renderers/common/RenderObject.js index b41f427290da20..7fafa2fcdabd31 100644 --- a/src/renderers/common/RenderObject.js +++ b/src/renderers/common/RenderObject.js @@ -233,7 +233,18 @@ export default class RenderObject { } - const itemCount = hasIndex === true ? index.count : geometry.attributes.position.count; + const position = geometry.attributes.position; + let itemCount = Infinity; + + if ( hasIndex ) { + + itemCount = index.count; + + } else if ( position !== undefined && position !== null ) { + + itemCount = position.count; + + } firstVertex = Math.max( firstVertex, 0 ); lastVertex = Math.min( lastVertex, itemCount );