Skip to content

Commit

Permalink
Three.js: Fixed __THREE__ code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 22, 2021
1 parent 952a482 commit 2a853ac
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Three.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,16 @@ if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {

}

if ( typeof __THREE__ !== undefined ) {
if ( window ) {

console.warn( 'WARNING: Multiple instances of Three.js being imported.' );
if ( window.__THREE__ ) {

} else {
console.warn( 'WARNING: Multiple instances of Three.js being imported.' );

// eslint-disable-next-line no-undef
__THREE__ = REVISION;
} else {

window.__THREE__ = REVISION;

}

}

0 comments on commit 2a853ac

Please sign in to comment.