fix: catch an edge case while saving request

This commit is contained in:
liyasthomas
2021-12-05 18:21:41 +05:30
parent fb6015ce26
commit e7535d505e
3 changed files with 23 additions and 5 deletions

View File

@@ -744,6 +744,12 @@ export function editRESTRequest(
requestIndex: number,
requestNew: HoppRESTRequest
) {
const indexPaths = path.split("/").map((x) => parseInt(x))
if (
!navigateToFolderWithIndexPath(restCollectionStore.value.state, indexPaths)
)
throw new Error("Path not found")
restCollectionStore.dispatch({
dispatcher: "editRequest",
payload: {