Convert NodeList to Array to use forEach in older browsers
This commit is contained in:
@@ -8,7 +8,8 @@ const windy = {
|
||||
};
|
||||
|
||||
export default function init() {
|
||||
document.querySelectorAll('img').forEach((image) => {
|
||||
Array.prototype.slice.call(document.querySelectorAll('img'))
|
||||
.forEach((image) => {
|
||||
const img = new Image(image);
|
||||
img.start();
|
||||
windy.images.push(img);
|
||||
|
||||
Reference in New Issue
Block a user