mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 13:56:11 +01:00
refactoring of access to options in frontend
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user