When calling an errback from a Promise.catch, pass err.message

This commit is contained in:
Bryan Housel
2019-04-25 21:58:36 -04:00
parent 3e363fed8b
commit b99be67169
11 changed files with 25 additions and 22 deletions
+4 -1
View File
@@ -480,7 +480,10 @@ export function uiFieldLocalized(field, context) {
_wikiTitles = {};
var wm = tags.wikipedia.match(/([^:]+):(.+)/);
if (wm && wm[0] && wm[1]) {
wikipedia.translations(wm[1], wm[2], function(d) { _wikiTitles = d; });
wikipedia.translations(wm[1], wm[2], function(err, d) {
if (err || !d) return;
_wikiTitles = d;
});
}
}