Browse Source

Prevent error

Temdog007 6 năm trước cách đây
mục cha
commit
8e7e2a2174
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      editor/js/Editor.js

+ 5 - 1
editor/js/Editor.js

@@ -482,7 +482,11 @@ Editor.prototype = {
 
 	focus: function ( object ) {
 
-		this.signals.objectFocused.dispatch( object );
+		if ( object !== undefined ) {
+
+			this.signals.objectFocused.dispatch( object );
+
+		}
 
 	},