From cd678c60de0af044ec44f76c8bfe7e1b5003b868 Mon Sep 17 00:00:00 2001 From: qschroter Date: Tue, 21 Nov 2023 16:18:53 +0100 Subject: [PATCH] may fix infinite loop --- package-lock.json | 2 +- src/Bones.UI/core/eventQueue.ts | 6 +++++- src/Bones.UI/core/serviceFactory.ts | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33e68fb..f1a3e5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "bones", + "name": "Bones", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/src/Bones.UI/core/eventQueue.ts b/src/Bones.UI/core/eventQueue.ts index 87cb1b2..cc4cc61 100644 --- a/src/Bones.UI/core/eventQueue.ts +++ b/src/Bones.UI/core/eventQueue.ts @@ -65,13 +65,17 @@ export class EventQueue { }); if (window.top) { + this.messageCounter++; + const id = "remote_" + this.messageCounter; + const message: WindowsMessage = { - id: _.uniqueId("remote_"), + id, topic, payload }; this.buffer[this.messageCounter % bufferSize] = message.id; + window.top.postMessage(JSON.stringify(message), "*"); } } diff --git a/src/Bones.UI/core/serviceFactory.ts b/src/Bones.UI/core/serviceFactory.ts index ed6303c..c479b92 100644 --- a/src/Bones.UI/core/serviceFactory.ts +++ b/src/Bones.UI/core/serviceFactory.ts @@ -39,8 +39,7 @@ export class ServiceFactory { const getMany = async (filter?: TFilter) => { const realUrl = typeof url === "string" ? url : url(); - console.log("TESST"); - console.log(buildURL(realUrl, filter)); + const response = await ServiceFactory.http.get(buildURL(realUrl, filter)); const dtos: TInfosDTO[] = response.data;