Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/nodes/core/NodeBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ class NodeBuilder {
* A list of all nodes the builder is processing
* for this 3D object.
*
* @type {Array<Node>}
* @type {Set<Node>}
*/
this.nodes = [];
this.nodes = new Set();

/**
* A list of all nodes the builder is processing in sequential order.
Expand Down Expand Up @@ -531,7 +531,7 @@ class NodeBuilder {
*/
includes( node ) {

return this.nodes.includes( node );
return this.nodes.has( node );

}

Expand Down Expand Up @@ -816,9 +816,9 @@ class NodeBuilder {
*/
addNode( node ) {

if ( this.nodes.includes( node ) === false ) {
if ( this.nodes.has( node ) === false ) {

this.nodes.push( node );
this.nodes.add( node );

this.setHashNode( node, node.getHash( this ) );

Expand Down
Loading