Skip to content

Commit 14a640b

Browse files
Lustmoredweaverryan
authored andcommitted
Make files mandatory in Backend.ts and pass empty map from controller
1 parent 2d13c27 commit 14a640b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/LiveComponent/assets/src/Backend/Backend.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface BackendInterface {
1313
updated: {[key: string]: any},
1414
children: ChildrenFingerprints,
1515
updatedPropsFromParent: {[key: string]: any},
16+
files: {[key: string]: FileList},
1617
): BackendRequest;
1718
}
1819

@@ -34,7 +35,7 @@ export default class implements BackendInterface {
3435
updated: {[key: string]: any},
3536
children: ChildrenFingerprints,
3637
updatedPropsFromParent: {[key: string]: any},
37-
files: {[key: string]: FileList} = {},
38+
files: {[key: string]: FileList},
3839
): BackendRequest {
3940
const { url, fetchOptions } = this.requestBuilder.buildRequest(
4041
props,

src/LiveComponent/assets/src/Component/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ export default class Component {
358358
this.valueStore.getDirtyProps(),
359359
this.getChildrenFingerprints(),
360360
this.valueStore.getUpdatedPropsFromParent(),
361+
{}, // Uploaded files will go here
361362
);
362363
this.hooks.triggerHook('loading.state:started', this.element, this.backendRequest);
363364

0 commit comments

Comments
 (0)