Skip to content

Commit

Permalink
Merge branch 'fix-sync-state-tracking' of https://github.com/Neurodat…
Browse files Browse the repository at this point in the history
…aWithoutBorders/nwb-guide into fix-sync-state-tracking
  • Loading branch information
garrettmflynn committed May 2, 2024
2 parents 46be542 + cdad7ed commit 9636f91
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/renderer/src/stories/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ export class Dashboard extends LitElement {
const { skipped } = this.subSidebar.sections[info.section]?.pages?.[info.id] ?? {};

if (skipped) {

if (isStorybook) return; // Do not skip on storybook

// Run skip functions
Expand All @@ -268,7 +267,6 @@ export class Dashboard extends LitElement {
if (previous && previous.info.previous === this.page) await this.page.onTransition(-1);
else await this.page.onTransition(1);
}

});
}

Expand Down Expand Up @@ -330,10 +328,10 @@ export class Dashboard extends LitElement {
if (typeof transition === "number") {
const info = this.page.info;
const sign = Math.sign(transition);
if (sign === 1) transition = info.next.info.id
if (sign === 1) transition = info.next.info.id;
else if (sign === -1) transition = (info.previous ?? info.parent).info.id; // Default to back in time
}

this.setAttribute("activePage", transition);

return promise;
Expand Down

0 comments on commit 9636f91

Please sign in to comment.