Closed

Description
This issue is automatically created based on existing pull request: #27690: Fix handling of mixins for modules with no dependencies defined
Description (*)
This PR addresses an issue that was outlined in #25587 (comment) and investigated by me afterwards.
This is a regression I have introduced when refactoring mixins module, but it applies only in two cases which are not present in the Magento itself:
// Module defined as anything else then a function with dependencies skipped.
define('my-module', {
foo: 'bar'
});
// Module defined with dependencies passed as "null".
define('my-module', null, {
foo: 'bar'
});
which both results in special case where second element of RequireJS's defQueue
is null
and made the script throw an error when somebody required such module.
Manual testing scenarios (*)
- Open the store.
- Open browser console.
- Paste and execute the following code:
define('my-module', {
foo: 'bar'
});
require(['my-module', function(){});
- Verify that no error similar to
TypeError: Cannot read property 'map' of null
is thrown.
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 1 Failed. Automatic verification of issue format is failedMay be fixed according to the position in the backlog.The issue has been reproduced on latest 2.4-develop branchAffects non-critical data or functionality and does not force users to employ a workaround.