From 0ee3df579265bcdf3e4b187a44b8f50907f1a995 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Thu, 19 Sep 2019 10:05:28 -0700 Subject: [PATCH] use window.pushState instead --- components/EditorContainer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/EditorContainer.js b/components/EditorContainer.js index 39b5009..903e70c 100644 --- a/components/EditorContainer.js +++ b/components/EditorContainer.js @@ -64,7 +64,8 @@ function EditorContainer(props) { if ('/' + (snippetId || '') === props.router.asPath) { return } - props.router.replace('/', '/' + (snippetId || ''), { shallow: true }) + window.history.pushState(null, null, '/' + (snippetId || '')) + // props.router.replace(props.router.asPath, '/' + (snippetId || ''), { shallow: true }) }, [snippetId, props.router]) function onEditorUpdate(state) {