Skip to content

Commit

Permalink
be smarter with how we push items into the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed May 19, 2022
1 parent 1e353f2 commit 0502f29
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions webview/src/experiments/components/table/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,15 @@ export const RowContextMenu: React.FC<RowProp> = ({

const isNotCheckpoint = depth <= 1 || isWorkspace

pushIf(isNotCheckpoint && !projectHasCheckpoints, [
pushIf(isNotCheckpoint, [
experimentMenuOption(
id,
'Modify and Run',
projectHasCheckpoints ? 'Modify and Resume' : 'Modify and Run',
MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_RUN
)
])

pushIf(isNotCheckpoint && projectHasCheckpoints, [
experimentMenuOption(
id,
'Modify and Resume',
MessageFromWebviewType.VARY_EXPERIMENT_PARAMS_AND_RUN
),
experimentMenuOption(
id,
'Modify, Reset and Run',
Expand Down

0 comments on commit 0502f29

Please sign in to comment.