We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 219591a commit 97f201cCopy full SHA for 97f201c
src/components/ImageWithSizeCalculation.js
@@ -56,7 +56,7 @@ class ImageWithSizeCalculation extends PureComponent {
56
getImageSize(url) {
57
return new Promise((resolve, reject) => {
58
Image.getSize(url, (width, height) => {
59
- resolve(width, height);
+ resolve({width, height});
60
}, (error) => {
61
reject(error);
62
});
@@ -70,7 +70,7 @@ class ImageWithSizeCalculation extends PureComponent {
70
71
this.getImageSizePromise = makeCancellablePromise(this.getImageSize(this.props.url));
72
this.getImageSizePromise.promise
73
- .then((width, height) => {
+ .then(({width, height}) => {
74
if (!width || !height) {
75
// Image didn't load properly
76
return;
0 commit comments