mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
refactoring of access to options in frontend
This commit is contained in:
@@ -331,16 +331,9 @@ async function treeInitialized() {
|
||||
return;
|
||||
}
|
||||
|
||||
let openTabs = [];
|
||||
const options = await optionsInit.waitForOptions();
|
||||
|
||||
try {
|
||||
const options = await optionsInit.optionsReady;
|
||||
|
||||
openTabs = JSON.parse(options.openTabs);
|
||||
}
|
||||
catch (e) {
|
||||
messagingService.logError("Cannot retrieve open tabs: " + e.stack);
|
||||
}
|
||||
const openTabs = options.getJson('openTabs') || [];
|
||||
|
||||
// if there's notePath in the URL, make sure it's open and active
|
||||
// (useful, among others, for opening clipped notes from clipper)
|
||||
|
||||
Reference in New Issue
Block a user