We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1985bd6 + 876e320 commit b2c6bd0Copy full SHA for b2c6bd0
1 file changed
utils/generate_metadata.js
@@ -44,10 +44,15 @@ const getImages = (_dir) => {
44
};
45
46
const loadImgData = async (_imgObject) => {
47
- return new Promise(async (resolve) => {
+ try {
48
const image = await loadImage(`${_imgObject.path}`);
49
- resolve({ imgObject: _imgObject, loadedImage: image });
50
- });
+ return {
+ imgObject: _imgObject,
51
+ loadedImage: image,
52
+ };
53
+ } catch (error) {
54
+ console.error("Error loading image:", error);
55
+ }
56
57
58
const draw = (_imgObject) => {
0 commit comments