1
0
Fork 0

maybe fix bug

This commit is contained in:
ChaotiCryptidz 2022-04-24 12:55:13 +01:00
parent cfe0b3e630
commit 06d0adb70e
No known key found for this signature in database

View file

@ -16,6 +16,8 @@ import {
import { combineKVPath, splitKVPath } from "./kvPathUtils"; import { combineKVPath, splitKVPath } from "./kvPathUtils";
import { sortedObjectMap } from "../../../../utils"; import { sortedObjectMap } from "../../../../utils";
import i18next from "i18next"; import i18next from "i18next";
import { route } from "preact-router";
import { kvViewURL } from "../../pageLinks";
export type KVEditProps = DefaultPageProps & { export type KVEditProps = DefaultPageProps & {
baseMount: string; baseMount: string;
@ -90,7 +92,7 @@ export class KVEditor extends Component<KVEditProps, KVEditState> {
combined.secretItem, combined.secretItem,
parseData(editorContent, this.state.syntax), parseData(editorContent, this.state.syntax),
); );
window.history.back(); route(kvViewURL(this.props.baseMount, this.props.secretPath, this.props.secretItem));
} catch (e: unknown) { } catch (e: unknown) {
const error = e as Error; const error = e as Error;
this.errorMessageRef.current.setErrorMessage(error.message); this.errorMessageRef.current.setErrorMessage(error.message);