fix(editor): proper length check for history when going back in editor (#3960)

This commit is contained in:
Erez Rokah 2020-06-29 16:19:13 +03:00 committed by GitHub
parent 09b6668c5e
commit 7ee9f2f188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -570,7 +570,7 @@ class EditorToolbar extends React.Component {
<ToolbarContainer> <ToolbarContainer>
<ToolbarSectionBackLink <ToolbarSectionBackLink
onClick={() => { onClick={() => {
if (history.length > 0) { if (history.length > 2) {
history.goBack(); history.goBack();
} else { } else {
history.push(`/collections/${collection.get('name')}`); history.push(`/collections/${collection.get('name')}`);