Fetch wmf-sitematrix from CDN.. No need to depend on it anymore.

This commit is contained in:
Bryan Housel
2020-01-30 09:48:37 -05:00
parent e19bcb77d5
commit 33a2dafc10
4 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ export function coreData(context) {
'phone_formats': 'data/phone_formats.min.json',
'shortcuts': 'data/shortcuts.min.json',
'territory_languages': 'data/territory_languages.min.json',
'wikipedia': 'data/wikipedia.min.json'
'wmf_sitematrix': 'https://cdn.jsdelivr.net/npm/wmf-sitematrix@0.1/wikipedia.min.json'
};
+1 -1
View File
@@ -23,7 +23,7 @@ export function uiFieldWikipedia(field, context) {
// be available the first time through, so things like the fetchers and
// the language() function will not work immediately.
let _dataWikipedia = [];
context.data().get('wikipedia')
context.data().get('wmf_sitematrix')
.then(d => _dataWikipedia = d)
.catch(() => { /* ignore */ });