Skip to content

Commit 7f34c9b

Browse files
authored
Fix error message HTTP response status code in image src setter (#2532)
1 parent 616859b commit 7f34c9b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1010
### Changed
1111
### Added
1212
### Fixed
13+
* Fix error message HTTP response status code in image src setter
1314
* `roundRect()` shape incorrect when radii were large relative to rectangle size (#2400)
1415
* Reject loadImage when src is null or invalid (#2304)
1516

lib/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Object.defineProperty(Image.prototype, 'src', {
5050
})
5151
.then(res => {
5252
if (!res.ok) {
53-
throw new Error(`Server responded with ${res.statusCode}`)
53+
throw new Error(`Server responded with ${res.status}`)
5454
}
5555
return res.arrayBuffer()
5656
})

0 commit comments

Comments
 (0)