Skip to content

Commit 570a8ee

Browse files
author
Egor Didenko
committed
fix(cloud-image-editor): adjusted activityParams
1 parent f3dbfe2 commit 570a8ee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/blocks/CloudImageEditorActivity/CloudImageEditorActivity.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ export class CloudImageEditorActivity extends UploaderBlock {
1717

1818
override get activityParams(): ActivityParams {
1919
const params = super.activityParams;
20+
21+
if (Array.isArray(params)) {
22+
if (params.length === 0) {
23+
throw new Error(`Cloud Image Editor activity params not found`);
24+
}
25+
26+
const [param] = params as ActivityParams[];
27+
return param as ActivityParams;
28+
}
29+
2030
if ('internalId' in params) {
2131
return params;
2232
}

0 commit comments

Comments
 (0)