소스 검색

null check on deleting entry from scope

Henry Oswald 11 년 전
부모
커밋
2c3b19e43d
1개의 변경된 파일과 1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      services/web/public/coffee/ide/file-tree/FileTreeManager.coffee

+ 1 - 0
services/web/public/coffee/ide/file-tree/FileTreeManager.coffee

@@ -306,6 +306,7 @@ define [
 			return (child_path.slice(0, parent_path.length) == parent_path)
 			return (child_path.slice(0, parent_path.length) == parent_path)
 
 
 		_deleteEntityFromScope: (entity, options = { moveToDeleted: true }) ->
 		_deleteEntityFromScope: (entity, options = { moveToDeleted: true }) ->
+			return if !entity?
 			parent_folder = null
 			parent_folder = null
 			@forEachEntity (possible_entity, folder) ->
 			@forEachEntity (possible_entity, folder) ->
 				if possible_entity == entity
 				if possible_entity == entity