From 46350b8e14a901bacf18479a56863668f38b9611 Mon Sep 17 00:00:00 2001 From: arunpadmasreede Date: Fri, 4 Jul 2025 16:13:39 +0000 Subject: [PATCH] Update for handling hostURL --- src/api/fetchModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/fetchModel.ts b/src/api/fetchModel.ts index 6e97cbcb..6ee3c3ed 100644 --- a/src/api/fetchModel.ts +++ b/src/api/fetchModel.ts @@ -55,7 +55,7 @@ export async function fetchModel({ if (cqPath || pagePath) { const path = (cqPath && sanitizeUrl(cqPath)) || Utils.getCQPath({ pagePath, itemPath }); if (host) { - const hostURL = sanitizeUrl(`${host}/${path}`).replace(/\/+/g, '/'); + const hostURL = new URL(path, host).toString(); const response = await fetch(`${hostURL}.model.json`, options); if (response.ok) { data = await response.json();