Call .getElement if the model has it.

This commit is contained in:
joshaber
2016-02-25 10:24:31 -05:00
parent 44dabf1e2f
commit 10f0064a63

View File

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