Skip to content

Commit

Permalink
fixing bugs: import mappings, empty monitor event
Browse files Browse the repository at this point in the history
  • Loading branch information
ck-c8y committed Mar 11, 2024
1 parent ea63e27 commit 72f8603
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class BrokerConfigurationService {
);
}),
map((event) => {
event[CONNECTOR_FRAGMENT].type = event.type;
event[CONNECTOR_FRAGMENT].type = event?.type;
return [event[CONNECTOR_FRAGMENT]];
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class ImportMappingsComponent implements OnDestroy {

onFileDroppedEvent(event) {
if (event && event.length > 0) {
const [file] = event;
// eslint-disable-next-line prefer-destructuring
const file = event[0].file;
this.onFile(file);
}
}
Expand All @@ -65,6 +66,7 @@ export class ImportMappingsComponent implements OnDestroy {
this.isLoading = true;
this.errorMessage = null;
this.progress$.next(0);
// const ms = await file.text();
const ms = await file.text();
const mappings: Mapping[] = JSON.parse(ms);
const countMappings = mappings.length;
Expand Down

0 comments on commit 72f8603

Please sign in to comment.