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

Commit

Permalink
wait for the proper event to auto connect live
Browse files Browse the repository at this point in the history
  • Loading branch information
jdiehl committed Jul 27, 2012
1 parent 909bf81 commit cfef069
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/LiveDevelopment/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, forin: true, maxerr: 50, regexp: true */
/*global define, $, less, window, XMLHttpRequest */
/*global brackets, define, $, less, window, XMLHttpRequest */

/**
* main integrates LiveDevelopment into Brackets
Expand Down Expand Up @@ -155,10 +155,10 @@ define(function main(require, exports, module) {

/** Setup autostarting of the live development connection */
function _setupAutoStart() {
var $DocumentManager = $(DocumentManager);
$DocumentManager.on("currentDocumentChange", function goLive() {
_handleGoLiveCommand();
$DocumentManager.off("currentDocumentChange", goLive);
brackets.ready(function() {
if (DocumentManager.getCurrentDocument()) {
_handleGoLiveCommand();
}
});
}

Expand Down

0 comments on commit cfef069

Please sign in to comment.