We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f94df43 + 72904ed commit aa23641Copy full SHA for aa23641
src/ace.tsx
@@ -421,11 +421,10 @@ export default class ReactAce extends React.Component<IAceEditorProps> {
421
if (valueChanged || !isEqual(nextProps.annotations, oldProps.annotations)) {
422
this.editor.getSession().setAnnotations(nextProps.annotations || []);
423
}
424
- if (
425
- !isEqual(nextProps.markers, oldProps.markers) &&
426
- Array.isArray(nextProps.markers)
427
- ) {
428
- this.handleMarkers(nextProps.markers);
+ const oldMarkers = oldProps.markers || [];
+ const nextMarkers = nextProps.markers || [];
+ if (!isEqual(oldMarkers, nextMarkers)) {
+ this.handleMarkers(nextMarkers);
429
430
431
// this doesn't look like it works at all....
0 commit comments