repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git]
/
ui
/
web
/
src
/
composables
/
UIClient.ts
diff --git
a/ui/web/src/composables/UIClient.ts
b/ui/web/src/composables/UIClient.ts
index 4cdfed71e5b3b53bf792d0dc8ae116af58bc7aa5..bbb4a4499b233a6aead4703eaf1b3de93004e32e 100644
(file)
--- a/
ui/web/src/composables/UIClient.ts
+++ b/
ui/web/src/composables/UIClient.ts
@@
-147,7
+147,7
@@
export class UIClient {
): Promise<ResponsePayload> {
let uuid: string;
return promiseWithTimeout(
): Promise<ResponsePayload> {
let uuid: string;
return promiseWithTimeout(
- new Promise((resolve, reject) => {
+ new Promise
<ResponsePayload>
((resolve, reject) => {
uuid = crypto.randomUUID();
const msg = JSON.stringify([uuid, command, data]);
uuid = crypto.randomUUID();
const msg = JSON.stringify([uuid, command, data]);
@@
-174,7
+174,7
@@
export class UIClient {
const response = JSON.parse(messageEvent.data) as ProtocolResponse;
if (Array.isArray(response) === false) {
const response = JSON.parse(messageEvent.data) as ProtocolResponse;
if (Array.isArray(response) === false) {
- throw new Error(`Response not an array: ${JSON.stringify(response,
null
, 2)}`);
+ throw new Error(`Response not an array: ${JSON.stringify(response,
undefined
, 2)}`);
}
const [uuid, responsePayload] = response;
}
const [uuid, responsePayload] = response;
@@
-192,7
+192,7
@@
export class UIClient {
}
this.deleteResponseHandler(uuid);
} else {
}
this.deleteResponseHandler(uuid);
} else {
- throw new Error(`Not a response to a request: ${JSON.stringify(response,
null
, 2)}`);
+ throw new Error(`Not a response to a request: ${JSON.stringify(response,
undefined
, 2)}`);
}
}
}
}
}
}