UI protocol: Allow to send some relevant commands to several charging… (#152)
[e-mobility-charging-stations-simulator.git] / src / ui / web / src / composable / UIClient.ts
index eb8e013e371e8e958e654bf00b62b80846a00922..6803ef03de2674486a9941406573ce48d4a3a48a 100644 (file)
@@ -112,8 +112,8 @@ export default class UIClient {
   private responseHandler(messageEvent: MessageEvent<string>): void {
     const data = JSON.parse(messageEvent.data) as ProtocolResponse;
 
-    if (Utils.isIterable(data) === false) {
-      throw new Error('Response not iterable: ' + JSON.stringify(data, null, 2));
+    if (Array.isArray(data) === false) {
+      throw new Error('Response not an array: ' + JSON.stringify(data, null, 2));
     }
 
     const [uuid, response] = data;