refactoring of access to options in frontend

This commit is contained in:
zadam
2019-08-22 23:31:02 +02:00
parent b84542064c
commit f9abea83f3
13 changed files with 93 additions and 62 deletions

View File

@@ -5,12 +5,12 @@ import noteDetailService from "./note_detail.js";
let hoistedNoteId;
optionsInit.optionsReady.then(options => {
hoistedNoteId = options['hoistedNoteId'];
optionsInit.waitForOptions().then(options => {
hoistedNoteId = options.get('hoistedNoteId');
});
async function getHoistedNoteId() {
await optionsInit.optionsReady;
await optionsInit.waitForOptions();
return hoistedNoteId;
}