Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in loadImage.js promise implimentation #2

Open
sastradhar opened this issue Jun 18, 2021 · 0 comments
Open

in loadImage.js promise implimentation #2

sastradhar opened this issue Jun 18, 2021 · 0 comments

Comments

@sastradhar
Copy link

Thanks for the great library.
in the file loadImage.js I think you should return resolve of the promise as show below.
Sorry if I am wrong but I had to do this to get my code to work. Thanks

import createImage from "./createImage.js"
function loadImage(imageId, options) {
const promise = new Promise((resolve, reject) => {
const image = createImage(imageId);
resolve(image);
});
return{ promise};
}

export default loadImage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant