Skip to content

Commit 9c14448

Browse files
@RI-5211 - fix history.block return value
1 parent c89101b commit 9c14448

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

redisinsight/ui/src/pages/rdi/instance/hooks/useUndeployedChangesPrompt.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ export const useUndeployedChangesPrompt = () => {
2020
}, [changes])
2121

2222
useEffect(() => {
23+
// @ts-ignore
2324
const unlistenBlockChecker = history.block((location: Location<unknown>) => {
2425
if (shouldBlockLeaving && !location?.pathname.startsWith(Pages.rdiPipeline(rdiInstanceId))) {
2526
setNextLocation(location)
2627
setShowModal(true)
2728
return false
2829
}
29-
return ''
30+
return true
3031
})
3132

3233
return () => {

0 commit comments

Comments
 (0)