Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Correctly handle scenario where no document is active.
Browse files Browse the repository at this point in the history
  • Loading branch information
gruehle committed Apr 5, 2012
1 parent bf10870 commit 37896f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,12 @@ define(function LiveDevelopment(require, exports, module) {
/** Triggered by a document change from the DocumentManager */
function _onDocumentChange() {
var doc = _getCurrentDocument();
if (!doc) {
return;
}

if (Inspector.connected()) {
if (!doc) {
close();
} else if (agents.network && agents.network.wasURLRequested(doc.url)) {
if (agents.network && agents.network.wasURLRequested(doc.url)) {
_closeDocument();
var editor = EditorManager.getCurrentFullEditor();
_openDocument(doc, editor);
Expand Down

0 comments on commit 37896f9

Please sign in to comment.