@neo4j-cypher/react-codemirror 2.0.0-next.2 → 2.0.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1429,7 +1429,8 @@ var CypherEditor = class extends Component {
1429
1429
  )
1430
1430
  });
1431
1431
  }
1432
- if (prevProps.history?.length !== this.props.history?.length) {
1432
+ const didChangeHistoryEstimate = prevProps.history?.length !== this.props.history?.length || prevProps.history?.[0] !== this.props.history?.[0];
1433
+ if (didChangeHistoryEstimate) {
1433
1434
  this.editorView.current.dispatch({
1434
1435
  effects: replaceHistory.of(this.props.history ?? [])
1435
1436
  });