Skip to content

Commit 4137f85

Browse files
Decio Ferreirarupertlssmith
Decio Ferreira
authored andcommitted
fixes elm#22
Make HTMLCollection and NodeList valid array types
1 parent 4ea8429 commit 4137f85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Elm/Kernel/Json.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ function _Json_isArray(value)
330330
{
331331
return Array.isArray(value)
332332
|| (typeof FileList !== 'undefined' && value instanceof FileList)
333-
|| (typeof TouchList !== 'undefined' && value instanceof TouchList);
333+
|| (typeof TouchList !== 'undefined' && value instanceof TouchList)
334+
|| (typeof HTMLCollection !== 'undefined' && value instanceof HTMLCollection)
335+
|| (typeof NodeList !== 'undefined' && value instanceof NodeList);
334336
}
335337

336338
function _Json_toElmArray(array)

0 commit comments

Comments
 (0)