Skip to content

Commit

Permalink
Fixes the number of directives displayed associated with snapshot (#1015
Browse files Browse the repository at this point in the history
)

* also use correct directives to display in table when snapshot is selected
  • Loading branch information
duranb authored Nov 28, 2023
1 parent c12528c commit 1e310b7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/routes/plans/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import { SearchParameters } from '../../../enums/searchParameters';
import {
activityDirectives,
activityDirectivesList,
activityDirectivesMap,
resetActivityStores,
selectActivity,
Expand Down Expand Up @@ -241,9 +240,7 @@
$: {
$activityDirectivesMap =
$planSnapshotId !== null && planSnapshotActivityDirectives.length > 0
? keyBy(planSnapshotActivityDirectives, 'id')
: keyBy($activityDirectives, 'id');
$planSnapshotId !== null ? keyBy(planSnapshotActivityDirectives, 'id') : keyBy($activityDirectives, 'id');
}
$: if ($plan && $planLocked) {
Expand Down Expand Up @@ -551,7 +548,7 @@
</Nav>
{#if $planSnapshot}
<PlanSnapshotBar
numOfDirectives={$activityDirectivesList.length}
numOfDirectives={planSnapshotActivityDirectives.length}
snapshot={$planSnapshot}
on:close={onCloseSnapshotPreview}
on:restore={onRestoreSnapshot}
Expand Down

0 comments on commit 1e310b7

Please sign in to comment.