Skip to content

Commit a78bfb1

Browse files
committed
More robust wasNotBufferGeometry check
1 parent ea5c899 commit a78bfb1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/js/modifiers/EdgeSplitModifier.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ THREE.EdgeSplitModifier = function () {
152152

153153
this.modify = function ( geometry, cutOffAngle ) {
154154

155-
const wasNotBufferGeometry = ! geometry.isBufferGeometry;
155+
const wasNotBufferGeometry = geometry.isBufferGeometry === undefined;
156156
if ( ! geometry.isBufferGeometry ) {
157157

158158
geometry = new THREE.BufferGeometry().fromGeometry( geometry );
@@ -165,7 +165,7 @@ THREE.EdgeSplitModifier = function () {
165165

166166
hadNormals = true;
167167

168-
if ( ! wasNotBufferGeometry )
168+
if ( wasNotBufferGeometry === false )
169169
geometry = geometry.clone();
170170

171171
geometry.deleteAttribute( 'normal' );

examples/jsm/modifiers/EdgeSplitModifier.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ var EdgeSplitModifier = function () {
160160

161161
this.modify = function ( geometry, cutOffAngle ) {
162162

163-
const wasNotBufferGeometry = ! geometry.isBufferGeometry;
163+
const wasNotBufferGeometry = geometry.isBufferGeometry === undefined;
164164
if ( ! geometry.isBufferGeometry ) {
165165

166166
geometry = new BufferGeometry().fromGeometry( geometry );
@@ -173,7 +173,7 @@ var EdgeSplitModifier = function () {
173173

174174
hadNormals = true;
175175

176-
if ( ! wasNotBufferGeometry )
176+
if ( wasNotBufferGeometry === false )
177177
geometry = geometry.clone();
178178

179179
geometry.deleteAttribute( 'normal' );

0 commit comments

Comments
 (0)