Просмотр исходного кода

added null check when looking for deletedByExternalDataSource

Henry Oswald 11 лет назад
Родитель
Сommit
4f11974c85

+ 1 - 1
services/web/public/coffee/ide.coffee

@@ -83,7 +83,7 @@ define [
 		$scope.$on "project:joined", () ->
 		$scope.$on "project:joined", () ->
 			return if inited
 			return if inited
 			inited = true
 			inited = true
-			if $scope.project.deletedByExternalDataSource
+			if $scope?.project?.deletedByExternalDataSource
 				ide.showGenericMessageModal("Project Renamed or Deleted", """
 				ide.showGenericMessageModal("Project Renamed or Deleted", """
 					This project has either been renamed or deleted by an external data source such as Dropbox.
 					This project has either been renamed or deleted by an external data source such as Dropbox.
 					We don't want to delete your data on ShareLaTeX, so this project still contains your history and collaborators.
 					We don't want to delete your data on ShareLaTeX, so this project still contains your history and collaborators.

+ 1 - 1
services/web/public/coffee/ide/file-tree/controllers/FileTreeFolderController.coffee

@@ -17,7 +17,7 @@ define [
 			# We need this here as well as in FileTreeController
 			# We need this here as well as in FileTreeController
 			# since the file-entity diretive creates a new scope
 			# since the file-entity diretive creates a new scope
 			# that doesn't inherit from previous scopes.
 			# that doesn't inherit from previous scopes.
-			return '0' if entity.type == "folder"
+			return '0' if entity?.type == "folder"
 			return '1'
 			return '1'
 
 
 		$scope.openNewDocModal = () ->
 		$scope.openNewDocModal = () ->