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

Commit feda20a

Browse files
committed
if page changed during live preview statup, then close
1 parent 8904b1d commit feda20a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/LiveDevelopment/LiveDevelopment.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -979,11 +979,10 @@ define(function LiveDevelopment(require, exports, module) {
979979
// navigate to the page first before loading can complete.
980980
// To accomodate this, we load all agents and navigate in
981981
// parallel.
982-
loadAgents(); // TODO - should we use Async.doInParallel() here?
983-
// We could also separate into preLoadAgents() and postLoadAgents()
982+
loadAgents();
984983

985984
_getInitialDocFromCurrent().done(function (doc) {
986-
if (doc) {
985+
if (doc && _liveDocument && doc === _liveDocument.doc) {
987986
// Navigate from interstitial to the document
988987
// Fires a frameNavigated event
989988
if (_server) {
@@ -1328,8 +1327,7 @@ define(function LiveDevelopment(require, exports, module) {
13281327
// navigate to the page first before loading can complete.
13291328
// To accomodate this, we load all agents (in reconnect())
13301329
// and navigate in parallel.
1331-
reconnect(); // TODO - should we use Async.doInParallel() here?
1332-
// We could also separate into preLoadAgents() and postLoadAgents()
1330+
reconnect();
13331331

13341332
// Reload HTML page
13351333
Inspector.Page.reload();

0 commit comments

Comments
 (0)