Skip to content

Commit

Permalink
Update modal settings after openNodeInModal (#3554)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesDoberer authored Dec 4, 2023
1 parent e511ad3 commit b9ba189
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/services/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ class RoutingClass {
if (additionalModalPath) {
const modalParams = RoutingHelpers.getModalParamsFromPath();
const { nodeObject } = await Navigation.extractDataFromPath(additionalModalPath);
LuigiNavigation.openAsModal(additionalModalPath, nodeObject.openNodeInModal || modalParams);
LuigiNavigation.openAsModal(additionalModalPath, modalParams || nodeObject.openNodeInModal);
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/test/services/routing.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ describe('Routing', function() {
// then
sinon.assert.calledWith(Navigation.extractDataFromPath, modalPath);
sinon.assert.calledOnce(LuigiNavigation.openAsModal);
sinon.assert.calledWithExactly(LuigiNavigation.openAsModal, modalPath, mockNodeModalSettings.openNodeInModal);
sinon.assert.calledWithExactly(LuigiNavigation.openAsModal, modalPath, modalParams);
});
});
describe('append and remove modal data from URL using path routing', () => {
Expand Down

0 comments on commit b9ba189

Please sign in to comment.