From 42fc54f716138d4a9df49d28b35478874aa69e2e Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 16 Oct 2014 13:18:15 -0600 Subject: [PATCH] Protect against stylesheets changing while detached --- src/text-editor-component.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text-editor-component.coffee b/src/text-editor-component.coffee index 037c96e65..7c852aa78 100644 --- a/src/text-editor-component.coffee +++ b/src/text-editor-component.coffee @@ -626,7 +626,7 @@ TextEditorComponent = React.createClass return unless @performedInitialMeasurement return unless atom.themes.isInitialLoadComplete() - @refreshScrollbars() if not styleElement? or @containsScrollbarSelector(styleElement.sheet) + @refreshScrollbars() if not styleElement.sheet? or @containsScrollbarSelector(styleElement.sheet) @sampleFontStyling() @sampleBackgroundColors() @remeasureCharacterWidths()