2
0
Эх сурвалжийг харах

fixed a bug (#9540)

* fixed a bug

if TouchEvent is not defined in the browser,an exception will be thrown,cause else branch statements not to be executed.

* fixed a bug

Check whether 'TouchEvent' is defined in the browser.

* trims extra spaces
Hu Jiulong 9 жил өмнө
parent
commit
ae9a3e426a

+ 1 - 1
examples/js/controls/TransformControls.js

@@ -1113,7 +1113,7 @@
 
 			_dragging = false;
 
-			if ( event instanceof TouchEvent ) {
+			if ( 'TouchEvent' in window && event instanceof TouchEvent ) {
 
 				// Force "rollover"