mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix issues with Wikidata field
This commit is contained in:
@@ -87,6 +87,10 @@ export default {
|
||||
languagesToQuery: function() {
|
||||
return localizer.localeCodes().map(function(code) {
|
||||
return code.toLowerCase();
|
||||
}).filter(function(code) {
|
||||
// HACK: en-us isn't a wikidata language. We should really be filtering by
|
||||
// the languages known to be supported by wikidata.
|
||||
return code !== 'en-us';
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -84,8 +84,10 @@ export function uiFieldWikidata(field, context) {
|
||||
.call(combobox.fetcher(fetchWikidataItems));
|
||||
|
||||
combobox.on('accept', function(d) {
|
||||
_qid = d.id;
|
||||
change();
|
||||
if (d) {
|
||||
_qid = d.id;
|
||||
change();
|
||||
}
|
||||
}).on('cancel', function() {
|
||||
setLabelForEntity();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user