Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 2, 2024
1 parent 7e41973 commit cdad7ed
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 cdad7ed

Please sign in to comment.