From fa3ef8f0c85d50f9138adca7d72d3e4e3898ef21 Mon Sep 17 00:00:00 2001 From: Decio Ferreira Date: Mon, 13 Apr 2020 12:05:15 +0100 Subject: [PATCH] Make HTMLCollection and NodeList valid array types --- src/Elm/Kernel/Json.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Elm/Kernel/Json.js b/src/Elm/Kernel/Json.js index 5623c1d..60b8fd3 100644 --- a/src/Elm/Kernel/Json.js +++ b/src/Elm/Kernel/Json.js @@ -328,7 +328,10 @@ function _Json_runArrayDecoder(decoder, value, toElmValue) function _Json_isArray(value) { - return Array.isArray(value) || (typeof FileList !== 'undefined' && value instanceof FileList); + return Array.isArray(value) + || (typeof FileList !== 'undefined' && value instanceof FileList) + || (typeof HTMLCollection !== 'undefined' && value instanceof HTMLCollection) + || (typeof NodeList !== 'undefined' && value instanceof NodeList); } function _Json_toElmArray(array)