Handle deleted files semi-gracefully

This commit is contained in:
James Allen 2014-03-21 14:48:26 +00:00
parent 5f8ed42006
commit 2581af0cda
2 changed files with 5 additions and 1 deletions

View file

@ -97,7 +97,7 @@ define [
@views[@selected_entity_id].deselect()
@selected_entity_id = entity_id
@ide.sideBarView.deselectAll()
@views[entity_id].select()
@views[entity_id]?.select()
getEntity: (entity_id) ->
@views[entity_id]?.model

View file

@ -127,6 +127,10 @@ define [
if @diffView?
@diffView.remove()
if !@diff.get("doc")?
console.log "This document has been deleted. What should we do?"
return
@diffView = new DiffView(
model: @diff
el: @$el.find(".track-changes-diff")