Skip to content

Commit b8fee3e

Browse files
committed
Merge branch 'main' of github.com:purecloudlabs/iframe-coordinator into fix-release-build
2 parents c432a23 + e2cfc99 commit b8fee3e

File tree

8 files changed

+896
-1147
lines changed

8 files changed

+896
-1147
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [6.3.4](https://github.com/purecloudlabs/iframe-coordinator/compare/v6.3.3...v6.3.4) (2025-08-07)
6+
7+
8+
### Bug Fixes
9+
10+
* **frame-router:** fix double-slash in host URL processing when path is `/` ([e63e8c9](https://github.com/purecloudlabs/iframe-coordinator/commit/e63e8c9b73413d94392a6b5308101ec70697d3ca))
11+
12+
### [6.3.3](https://github.com/purecloudlabs/iframe-coordinator/compare/v6.3.2...v6.3.3) (2025-08-07)
13+
514
### [6.3.2](https://github.com/purecloudlabs/iframe-coordinator/compare/v6.3.1...v6.3.2) (2025-08-05)
615

716

apps/ifc-example-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ifc-example-client",
3-
"version": "6.3.2",
3+
"version": "6.3.4",
44
"description": "Demo app for iframe-coordinator project",
55
"repository": {
66
"type": "git",

package-lock.json

Lines changed: 848 additions & 1142 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iframe-coordinator-monorepo",
3-
"version": "6.3.2",
3+
"version": "6.3.4",
44
"workspaces": [
55
"./packages/iframe-coordinator",
66
"./packages/iframe-coordinator-cli",

packages/iframe-coordinator-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iframe-coordinator-cli",
3-
"version": "6.3.2",
3+
"version": "6.3.4",
44
"description": "CLI for local iframe-coordinator development",
55
"dependencies": {
66
"cheerio": "1.0.0-rc.12",

packages/iframe-coordinator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iframe-coordinator",
3-
"version": "6.3.2",
3+
"version": "6.3.4",
44
"description": "Tools for coordinating embedded apps via iframes.",
55
"dependencies": {
66
"decoders": "1.15.0"

packages/iframe-coordinator/src/elements/frame-router.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ export default class FrameRouterElement extends HTMLElement {
272272
if (!hostUrlObject.hash) {
273273
hostUrlObject.pathname = stripTrailingSlash(hostUrlObject.pathname);
274274
if (window.location.hash) {
275-
hostUrlObject.pathname += "/";
275+
if (hostUrlObject.pathname !== "/") {
276+
hostUrlObject.pathname += "/";
277+
}
276278
hostUrlObject.hash = "#";
277279
}
278280
}

packages/iframe-coordinator/src/specs/FrameRouter.spec.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ const ENV_DATA = {
55
hostRootUrl: "https://example.com/root/",
66
};
77

8+
const ENV_DATA_SINGLE_SLASH = {
9+
...ENV_DATA,
10+
hostRootUrl: "https://example.com/",
11+
};
12+
813
const ENV_DATA_WITH_HASH = {
914
...ENV_DATA,
1015
hostRootUrl: "https://example.com/root/#/",
@@ -62,6 +67,33 @@ describe("The frame router element", () => {
6267
});
6368
});
6469

70+
it("Correctly process a host URL using the root path with no hash", () => {
71+
const router = new FrameRouterElement();
72+
router.clientConfig = {
73+
clients: {},
74+
envData: ENV_DATA_SINGLE_SLASH,
75+
};
76+
//@ts-ignore
77+
expect(router._envData).toEqual({
78+
...ENV_DATA,
79+
hostRootUrl: "https://example.com/",
80+
});
81+
});
82+
83+
it("Correctly process a host URL using the root path with a hash", () => {
84+
window.location.hash = "foo";
85+
const router = new FrameRouterElement();
86+
router.clientConfig = {
87+
clients: {},
88+
envData: ENV_DATA_SINGLE_SLASH,
89+
};
90+
//@ts-ignore
91+
expect(router._envData).toEqual({
92+
...ENV_DATA,
93+
hostRootUrl: "https://example.com/#",
94+
});
95+
});
96+
6597
it("Does not modify the provided host URL if it and the current location have a fragment", () => {
6698
window.location.hash = "foo";
6799
const router = new FrameRouterElement();

0 commit comments

Comments
 (0)