maybe fix bug
This commit is contained in:
parent
cfe0b3e630
commit
06d0adb70e
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue