Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardMoyse committed Nov 29, 2024
1 parent fbe001a commit dfd23ba
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions packages/phoenix-event-display/src/managers/url-options-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ export class URLOptionsManager {
} else {
file = this.urlOptions.get('file') ?? '';
type = this.urlOptions.get('type')?.toLowerCase() ?? '';
console.log('Default file(',defaultEventPath,') was overridden by URL options to: ', file );

console.log(
'Default file(',
defaultEventPath,
') was overridden by URL options to: ',
file,
);
}

console.log('Try to load event file: ', file, 'of type', type);
Expand All @@ -94,7 +98,11 @@ export class URLOptionsManager {
fetch(this.urlOptions.get('config') ?? '')
.then((res) => res.json())
.then((jsonState) => {
console.log("Applying configuration ", this.urlOptions.get('config'), " from urlOptions");
console.log(
'Applying configuration ',
this.urlOptions.get('config'),
' from urlOptions',
);
const stateManager = new StateManager();
stateManager.loadStateFromJSON(jsonState);
})
Expand Down Expand Up @@ -142,12 +150,14 @@ export class URLOptionsManager {
* @returns An empty promise. ;(
*/
private async handleJiveXMLEvent(fileURL: string) {
const fileData = await (await fetch(fileURL).then((response) => {
if (response.status >= 400 && response.status < 600) {
throw new Error("Bad response from server");
}
return response;
})).text();
const fileData = await (
await fetch(fileURL).then((response) => {
if (response.status >= 400 && response.status < 600) {
throw new Error('Bad response from server');
}
return response;
})
).text();
if (!this.configuration.eventDataLoader) {
this.configuration.eventDataLoader = new JiveXMLLoader();
}
Expand Down

0 comments on commit dfd23ba

Please sign in to comment.