Skip to content

Commit fc79110

Browse files
committed
Animation: Fix ReferenceError in Node.js environment
Node.js do not support `self`.
1 parent 541455a commit fc79110

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderers/common/Animation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Animation {
3434
*
3535
* @type {Window|XRSession}
3636
*/
37-
this._context = self;
37+
this._context = typeof self !== 'undefined' ? self : null;
3838

3939
/**
4040
* The user-defined animation loop.

0 commit comments

Comments
 (0)