From 6e8e10323f4f5b0e5897b6741fff015075c8c9f5 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 10 Dec 2025 23:19:17 +0200 Subject: [PATCH] chore(client): address requested changes --- apps/client/src/services/experimental_features.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/client/src/services/experimental_features.ts b/apps/client/src/services/experimental_features.ts index 9295aa8c7..5f7e5d010 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() {