mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 02:14:25 +01:00
chore(experimental_features): address review
This commit is contained in:
parent
3060207d04
commit
a197a33d35
@ -28,7 +28,12 @@ export function getEnabledExperimentalFeatureIds() {
|
||||
|
||||
function getEnabledFeatures() {
|
||||
if (!enabledFeatures) {
|
||||
const features = JSON.parse(options.get("experimentalFeatures")) as ExperimentalFeatureId[];
|
||||
let features: ExperimentalFeatureId[] = [];
|
||||
try {
|
||||
features = JSON.parse(options.get("experimentalFeatures")) as ExperimentalFeatureId[];
|
||||
} catch (e) {
|
||||
console.warn("Failed to parse experimental features from options:", e);
|
||||
}
|
||||
enabledFeatures = new Set(features);
|
||||
}
|
||||
return enabledFeatures;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user