From 5259d5b750831a23f7d9d9df6f67ed2d0261d6b3 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 16 Jun 2014 15:40:54 -0700 Subject: [PATCH] Dont render invalid highlight decorations --- src/editor-component.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index 8efe0094d..ac7649ed5 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -238,7 +238,7 @@ EditorComponent = React.createClass filteredDecorations = {} for id, decorations of decorationsByMarkerId for decoration in decorations - if decoration.isType(decorationType) + if decoration.isType(decorationType) and decoration.isValid() # Using decoration.toObject() for comparability sake. This effectively # caches the current state of the decoration object (importantly, the range). # We need to cache the range because the Decoration's marker's range changes.