Protect against stylesheets changing while detached

This commit is contained in:
Nathan Sobo
2014-10-16 13:18:15 -06:00
parent c11675dca1
commit 42fc54f716

View File

@@ -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()