Skip to content

Commit 0e6824e

Browse files
committed
2 parents a79fdb7 + 125d27d commit 0e6824e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,12 @@ const addAttributes = (_element) => {
178178

179179
const loadLayerImg = async (_layer) => {
180180
try {
181-
const image = await loadImage(`${_layer.selectedElement.path}`);
181+
if (_layer.selectedElement.path.includes("-")) {
182+
throw new Error("layer name can not contain dashes");
183+
}
184+
const image = await loadImage(`${_imgObject.path}`);
182185
return {
183-
layer: _layer,
186+
imgObject: _imgObject,
184187
loadedImage: image,
185188
};
186189
} catch (error) {

0 commit comments

Comments
 (0)