Skip to content

Commit 7c6566e

Browse files
committed
Add guards to scrollToItem
1 parent 438b8db commit 7c6566e

File tree

1 file changed

+1
-1
lines changed
  • addon/components/collection-scroll-view

1 file changed

+1
-1
lines changed

addon/components/collection-scroll-view/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ function isChildComponent(component, candidateChildComponent) {
137137
}
138138

139139
function isChildElement(element, candidateChildElement) {
140-
return element.contains(candidateChildElement);
140+
return element && (candidateChildElement instanceof HTMLElement) && element.contains(candidateChildElement);
141141
}

0 commit comments

Comments
 (0)