mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04: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