Zotero.Promise.coroutine not supported in connector shared code (broken ef1ff8b
)
This commit is contained in:
parent
c4d39ba79f
commit
38b0fb2650
1 changed files with 38 additions and 35 deletions
|
@ -42,14 +42,16 @@ Zotero.Date = new function(){
|
|||
var _months;
|
||||
var _monthsWithEnglish;
|
||||
|
||||
this.init = Zotero.Promise.coroutine(function* () {
|
||||
this.init = function () {
|
||||
if (!Zotero.isFx || Zotero.isBookmarklet) {
|
||||
throw new Error("Unimplemented");
|
||||
}
|
||||
|
||||
var json = (yield Zotero.HTTP.request(
|
||||
return Zotero.HTTP.request(
|
||||
'GET', 'resource://zotero/schema/dateFormats.json', { responseType: 'json' }
|
||||
)).response;
|
||||
).then(function(xmlhttp) {
|
||||
var json = xmlhttp.response;
|
||||
|
||||
var locale = Zotero.locale;
|
||||
var english = locale.startsWith('en');
|
||||
// If no exact match, try first two characters ('de')
|
||||
|
@ -85,6 +87,7 @@ Zotero.Date = new function(){
|
|||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue