Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephVolosin committed Nov 20, 2024
1 parent 28be295 commit 5745f17
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/components/external-source/ExternalSourceManager.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -483,17 +483,21 @@
function doesSourceTypeAndEventTypesExist(externalSource: ExternalSourceJson): boolean {
// Check that the External Source Type for the source to-be-uploaded exists
const externalSourceType = $externalSourceTypes.find(sourceType => sourceType.name === externalSource.source.source_type);
const externalSourceType = $externalSourceTypes.find(
sourceType => sourceType.name === externalSource.source.source_type,
);
if (externalSourceType === undefined) {
uploadDisabledMessage = `External Source Type "${externalSource.source.source_type}" is not defined. Please create it!`
uploadDisabledMessage = `External Source Type "${externalSource.source.source_type}" is not defined. Please create it!`;
return true;
}
// Check that all the External Event Types for the source to-be-uploaded exist
const newSourceExternalEventTypes: string[] = Array.from(new Set(externalSource.events.map(event => event.event_type)));
const newSourceExternalEventTypes: string[] = Array.from(
new Set(externalSource.events.map(event => event.event_type)),
);
for (const eventType of newSourceExternalEventTypes) {
if ($externalEventTypes.find(eventTypeFromDB => eventTypeFromDB.name === eventType) === undefined) {
uploadDisabledMessage = `External Event Type "${eventType}" is not defined. Please create it!`
uploadDisabledMessage = `External Event Type "${eventType}" is not defined. Please create it!`;
return true;
}
}
Expand Down

0 comments on commit 5745f17

Please sign in to comment.