mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Ensure domNode is not set arbitrarily to null
This commit is contained in:
@@ -36,6 +36,12 @@ class TextEditorComponent
|
||||
mounted: true
|
||||
initialized: false
|
||||
|
||||
Object.defineProperty @prototype, "domNode",
|
||||
get: -> @domNodeValue
|
||||
set: (domNode) ->
|
||||
atom.assert domNode?, "TextEditorComponent::domNode was set to null."
|
||||
@domNodeValue = domNode
|
||||
|
||||
constructor: ({@editor, @hostElement, @rootElement, @stylesElement, @useShadowDOM, tileSize}) ->
|
||||
@tileSize = tileSize if tileSize?
|
||||
@disposables = new CompositeDisposable
|
||||
|
||||
Reference in New Issue
Block a user