added null check when looking for deletedByExternalDataSource

This commit is contained in:
Henry Oswald 2015-02-23 17:33:05 +00:00
parent 5028665913
commit 4f11974c85
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ define [
$scope.$on "project:joined", () ->
return if inited
inited = true
if $scope.project.deletedByExternalDataSource
if $scope?.project?.deletedByExternalDataSource
ide.showGenericMessageModal("Project Renamed or Deleted", """
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.

View file

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