Use Array.from() in $$

This commit is contained in:
Simon Willison 2021-12-14 17:27:00 -08:00 committed by AJ ONeal
parent ceda8242d9
commit c50bcca6ca
1 changed files with 1 additions and 1 deletions

View File

@ -3,5 +3,5 @@ function $(sel, el) {
}
function $$(sel, el) {
return (el || document).querySelectorAll(sel);
return Array.from((el || document).querySelectorAll(sel));
}