Skip to content

Commit a14714d

Browse files
authored
[5.2][bug] Codemirror duplicated assets entries (joomla#44674)
1 parent d5a87e1 commit a14714d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build/build-modules-js/init/common/resolve-package.es6.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports.resolvePackageFile = (relativePath) => {
2727
* @returns {[]}
2828
*/
2929
module.exports.getPackagesUnderScope = (scope) => {
30-
const cmModules = [];
30+
const cmModules = new Set();
3131

3232
// Get the scope roots
3333
const roots = [];
@@ -41,9 +41,9 @@ module.exports.getPackagesUnderScope = (scope) => {
4141
// List of modules
4242
roots.forEach((rootPath) => {
4343
readdirSync(rootPath).forEach((subModule) => {
44-
cmModules.push(`${scope}/${subModule}`);
44+
cmModules.add(`${scope}/${subModule}`);
4545
});
4646
});
4747

48-
return cmModules;
48+
return [...cmModules];
4949
};

0 commit comments

Comments
 (0)