Skip to content

Commit 1fafacc

Browse files
added: fix errors in the doc
1 parent eeff463 commit 1fafacc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ loadImages([
3838
'path/to/the/image1.jpg',
3939
'path/to/the/image2.jpg'
4040
])
41-
.then(img => document.body.appendChild(img))
41+
.then(imgs => imgs.forEach(i => document.body.appendChild(i)))
4242
.catch(error => {
4343
// there was an error loading one of images
4444
})
@@ -52,7 +52,7 @@ import $ from 'bianco.query'
5252
import { loadImages } from 'bianco.images-loader'
5353

5454
loadImages($('img', '.main-content'))
55-
.then(img => img.classList.add('loaded'))
55+
.then(imgs => imgs.forEach(i => i.classList.add('loaded')))
5656
.catch(error => {
5757
// there was an error loading one of images
5858
})

0 commit comments

Comments
 (0)