Skip to content

Commit

Permalink
fix wrong msg target resolution (#3988)
Browse files Browse the repository at this point in the history
* fix wrong msg target resolution

* tets
  • Loading branch information
hardl authored Oct 11, 2024
1 parent 3814828 commit d00aa2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ whitesource.config.json
plugin*.js
core/dev-tools/latest_build.log
core/dev-tools/simple-app
core-modular/dev-tools/simple-app
/full_eslint_report.html
test/e2e-test-application/cypress/screenshots
**/.DS_Store
2 changes: 1 addition & 1 deletion container/src/services/container.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class ContainerService {
},
authData: targetCnt.authData || {}
},
target.origin
event.origin
);
break;
case LuigiInternalMessageID.NAVIGATION_REQUEST:
Expand Down
2 changes: 1 addition & 1 deletion container/test/services/container.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe('getContainerManager messageListener', () => {

it('test get context message', () => {
const event = {
origin: '*',
source: cw,
data: {
msg: LuigiInternalMessageID.GET_CONTEXT,
Expand All @@ -88,7 +89,6 @@ describe('getContainerManager messageListener', () => {

// Replace the real postMessage with the mock
cw.postMessage = postMessageMock;
cw.origin = '*';

// Define the message to send and target Origin
const message = {
Expand Down

0 comments on commit d00aa2e

Please sign in to comment.