From 7ee9f2f1888fe93bd197c205fff63b90ad54b6aa Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 29 Jun 2020 16:19:13 +0300 Subject: [PATCH] fix(editor): proper length check for history when going back in editor (#3960) --- .../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 18ceca99..7239bd82 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')}`);