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

Commit

Permalink
Merge pull request #553 from adobe/glenn/issue-545
Browse files Browse the repository at this point in the history
Correctly handle scenario where no document is active.
  • Loading branch information
njx committed Apr 5, 2012
2 parents 74e23c0 + 37896f9 commit d0a6ab7
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 d0a6ab7

Please sign in to comment.