From cb40bb418fe611b7a59394815ffa0c17ec30a381 Mon Sep 17 00:00:00 2001 From: Russell Bicknell Date: Mon, 11 Jun 2018 11:32:40 -0700 Subject: [PATCH] Replace an attempt to spread a NodeList to an array with `Array.from` for Safari 9, where NodeList is not iterable. --- lib/utils/gestures.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/gestures.html b/lib/utils/gestures.html index c968bc914a..0bdbd961c3 100644 --- a/lib/utils/gestures.html +++ b/lib/utils/gestures.html @@ -140,7 +140,7 @@ * @return {!Array} Relevant label for `el` */ function matchingLabels(el) { - let labels = [...(/** @type {HTMLInputElement} */(el).labels || [])]; + let labels = Array.from(/** @type {HTMLInputElement} */(el).labels || []); // IE doesn't have `labels` and Safari doesn't populate `labels` // if element is in a shadowroot. // In this instance, finding the non-ancestor labels is enough,