From 97586506fb861c9ca0af1e7fd4941ed0ec5b1b9b Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Wed, 8 Feb 2017 19:47:58 +0000 Subject: Guard against undefined (out of spec) getDestinationInsertionPoints --- lib/dom_utils.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index fad5ffbf..500332e0 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -342,7 +342,7 @@ DomUtils = # If the element is rendered in a shadow DOM via a element, the element will be # returned, so the shadow DOM is traversed rather than passed over. getContainingElement: (element) -> - element.getDestinationInsertionPoints()[0] or element.parentElement + element.getDestinationInsertionPoints?()[0] or element.parentElement # This tests whether a window is too small to be useful. windowIsTooSmall: -> -- cgit v1.2.3