Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
clearing the externalRoute once it's used
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisio committed Dec 20, 2017
1 parent 38c6c40 commit ff9db60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,14 @@ app.pageNav = new PageNav({
});
$('#pageNavContainer').append(app.pageNav.render().el);

let externalRoute = remote.getGlobal('externalRoute');

app.router = new ObRouter();

// Clear the external route flag as soon as it's used so it's not re-used
// on app refreshes.
app.router.on('route', () => (externalRoute = null));

// create our status bar view
app.statusBar = new StatusBar();
$('#statusBar').html(app.statusBar.render().el);
Expand Down Expand Up @@ -520,8 +526,6 @@ function start() {
// set the profile data for the feedback mechanism
setFeedbackOptions();

const externalRoute = remote.getGlobal('externalRoute');

if (externalRoute) {
// handle opening the app from an an external ob link
location.hash = `#${externalRoute}`;
Expand Down

0 comments on commit ff9db60

Please sign in to comment.