From 9adb4c03ef14f1dc170d4b30d9b55a2c3bc04ce8 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Mon, 29 Jun 2020 15:41:14 +0300 Subject: [PATCH] fix(editor): proper length check for history when going back in editor --- .../netlify-cms-core/src/components/Editor/EditorToolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js b/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js index 18ceca99d998..7239bd823ca5 100644 --- a/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js +++ b/packages/netlify-cms-core/src/components/Editor/EditorToolbar.js @@ -570,7 +570,7 @@ class EditorToolbar extends React.Component { { - if (history.length > 0) { + if (history.length > 2) { history.goBack(); } else { history.push(`/collections/${collection.get('name')}`);