Skip to content

Commit 78d4f61

Browse files
committed
fix: redirect to new page when id does not found
1 parent b56ebaa commit 78d4f61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/container/edit-container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const EditContainer = () => {
5151
try {
5252
const result = await fetchNote(id)
5353
if (!result) {
54-
router.replace({ query: { new: '1' }, path: router.asPath })
54+
router.replace({ query: { ...router.query, new: 1 } })
5555
return
5656
}
5757
} catch (msg) {

0 commit comments

Comments
 (0)