Skip to content

Build your personal knowledge base with Trilium Notes

chore(client): address requested changes

Elian Doran6e8e10323f4f
diff --git a/apps/client/src/services/experimental_features.ts b/apps/client/src/services/experimental_features.ts
index 9295aa8c7b..5f7e5d0109 100644
--- a/apps/client/src/services/experimental_features.ts
+++ b/apps/client/src/services/experimental_features.ts
@@ -28,15 +28,13 @@ export function getEnabledExperimentalFeatureIds() {
}
export async function toggleExperimentalFeature(featureId: ExperimentalFeatureId, enable: boolean) {
- let features = Array.from(getEnabledFeatures());
+ const features = new Set(getEnabledFeatures());
if (enable) {
- if (!features.includes(featureId)) {
- features.push(featureId);
- }
+ features.add(featureId);
} else {
- features = features.filter(f => f !== featureId);
+ features.delete(featureId);
}
- await options.save("experimentalFeatures", JSON.stringify(features));
+ await options.save("experimentalFeatures", JSON.stringify(Array.from(features)));
}
function getEnabledFeatures() {