mirror of
https://github.com/atom/atom.git
synced 2026-02-08 13:45:09 -05:00
Call .getElement if the model has it.
This commit is contained in:
@@ -171,6 +171,11 @@ class ViewRegistry
|
||||
if object instanceof HTMLElement
|
||||
return object
|
||||
|
||||
if typeof object?.getElement is 'function'
|
||||
element = object.getElement()
|
||||
if element instanceof HTMLElement
|
||||
return element
|
||||
|
||||
if object?.element instanceof HTMLElement
|
||||
return object.element
|
||||
|
||||
|
||||
Reference in New Issue
Block a user