浏览代码

Prevent error

Temdog007 6 年之前
父节点
当前提交
8e7e2a2174
共有 1 个文件被更改,包括 5 次插入1 次删除
  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 );
+
+		}
 
 	},