Skip to content

Commit

Permalink
feat(frame-router): emit clientNotFound event after each invalid rout…
Browse files Browse the repository at this point in the history
…e change

COMUI-1632
  • Loading branch information
thomas-c-dillon committed Apr 17, 2023
1 parent 9ea3546 commit 837d0e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/iframe-coordinator/src/elements/frame-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ export default class FrameRouterElement extends HTMLElement {
);
}

if (clientInfo === null) {
/**
* Emit a clientNotFound event when there is not matching client.
* As legacy behavior, a clientChanged event will also fire unless the
* _currentClientId was already an empty string.
*/
this.dispatchEvent(new CustomEvent('clientNotFound'));
}

this._currentClientId = newClientId;

const newLocation = this._frameManager.setFrameLocation(
Expand Down

0 comments on commit 837d0e5

Please sign in to comment.