chore(client): address requested changes

This commit is contained in:
Elian Doran 2025-12-10 23:19:17 +02:00
parent 58bc5dc66a
commit 6e8e10323f
No known key found for this signature in database

View File

@ -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() {