mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Return default value of true from TextEditor.getAutoHeight
When we need to check for unassigned in the deprecated code path, we can just read the instance variable directly to avoid getting the deafult. Signed-off-by: Antonio Scandurra <as-cii@github.com>
This commit is contained in:
@@ -57,7 +57,7 @@ class TextEditorComponent
|
||||
cursorBlinkResumeDelay: @cursorBlinkResumeDelay
|
||||
stoppedScrollingDelay: 200
|
||||
lineTopIndex: lineTopIndex
|
||||
autoHeight: @editor.getAutoHeight() ? true
|
||||
autoHeight: @editor.getAutoHeight()
|
||||
|
||||
@presenter.onDidUpdateState(@requestUpdate)
|
||||
|
||||
@@ -759,7 +759,7 @@ class TextEditorComponent
|
||||
# auto-height in certain circumstances. This is legacy behavior that we
|
||||
# would rather not implement, but we can't remove it without risking
|
||||
# breakage currently.
|
||||
unless @editor.getAutoHeight()?
|
||||
unless @editor.autoHeight?
|
||||
{position, top, bottom} = getComputedStyle(@hostElement)
|
||||
hasExplicitTopAndBottom = (position is 'absolute' and top isnt 'auto' and bottom isnt 'auto')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user