mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
gestures: Avoid spreading non-iterable in older browsers
Instead just convert to array.
This commit is contained in:
@@ -125,7 +125,7 @@ function canBeLabelled(el) {
|
||||
* @return {!Array<!HTMLLabelElement>} Relevant label for `el`
|
||||
*/
|
||||
function matchingLabels(el) {
|
||||
let labels = [...(/** @type {HTMLInputElement} */((el).labels || []))];
|
||||
let labels = Array.prototype.slice.call(/** @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,
|
||||
|
||||
Reference in New Issue
Block a user