Skip to content

Commit

Permalink
fix(web-scraping): disable Show diff switch if tracker history is n…
Browse files Browse the repository at this point in the history
…ot available
  • Loading branch information
azasypkin committed Dec 9, 2023
1 parent 6385033 commit 3ddca9a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ export function WebPageTrackerHistory({ kind, tracker, children }: WebPageTracke
<EuiFlexItem grow={false}>
<EuiSwitch
label="Show diff"
disabled={revisions.status === 'pending' || (revisions.status === 'succeeded' && revisions.data.length < 2)}
disabled={
revisions.status !== 'succeeded' || (revisions.status === 'succeeded' && revisions.data.length < 2)
}
checked={showDiff}
onChange={(e) => setShowDiff(e.target.checked)}
/>
Expand Down

0 comments on commit 3ddca9a

Please sign in to comment.