From 06d0adb70e17a5579e9883a8ff43449ed28ec501 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Sun, 24 Apr 2022 12:55:13 +0100 Subject: [PATCH] maybe fix bug --- src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx index 487a02b..6a3c521 100644 --- a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx +++ b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx @@ -16,6 +16,8 @@ import { import { combineKVPath, splitKVPath } from "./kvPathUtils"; import { sortedObjectMap } from "../../../../utils"; import i18next from "i18next"; +import { route } from "preact-router"; +import { kvViewURL } from "../../pageLinks"; export type KVEditProps = DefaultPageProps & { baseMount: string; @@ -90,7 +92,7 @@ export class KVEditor extends Component { combined.secretItem, parseData(editorContent, this.state.syntax), ); - window.history.back(); + route(kvViewURL(this.props.baseMount, this.props.secretPath, this.props.secretItem)); } catch (e: unknown) { const error = e as Error; this.errorMessageRef.current.setErrorMessage(error.message);