Return an empty array if there are no languages in territory

Downstream bug:
https://phabricator.wikimedia.org/T265158
This commit is contained in:
Amir Aharoni
2020-11-12 14:17:24 +02:00
committed by Niklas Laxström
parent 967eec093e
commit 9a1f5c0e5a

View File

@@ -282,7 +282,7 @@
* @return {string[]} list of language codes * @return {string[]} list of language codes
*/ */
$.uls.data.getLanguagesInTerritory = function ( territory ) { $.uls.data.getLanguagesInTerritory = function ( territory ) {
return $.uls.data.territories[ territory ]; return $.uls.data.territories[ territory ] || [];
}; };
/** /**