File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ const isGroup = (id) => id[0] === ":";
41
41
*
42
42
* This also resolves any requires and dependency ordering issues.
43
43
* The returned list can be registered sequentially and should "just work".
44
+ * If multiple languages have the same name, the last one wins.
45
+ * This gives priority to third-party packages so they can override built-in languages.
44
46
*
45
47
* @param {array<Lanuage> } allLanguages - full list of languages
46
48
* @param {array<name|group_name> } includes - which languages or groups to include
@@ -50,6 +52,7 @@ const isGroup = (id) => id[0] === ":";
50
52
const filter = ( allLanguages , includes ) => {
51
53
if ( ! includes || includes . length === 0 ) { return reorderDependencies ( allLanguages ) ; }
52
54
55
+ allLanguages . reverse ( ) ;
53
56
let languages = [ ] ;
54
57
for ( const item of includes ) {
55
58
if ( isGroup ( item ) ) {
You can’t perform that action at this time.
0 commit comments