When a SELECTIVE switch is freshly created and has no conditions, it is treated as active. However, once conditions are added and then removed, leaving no conditions, instead of the value being {}, it might be stored as something like this: {"auth.user": {"is_superuser": [], "is_staff": []}}. This will then effectively be treated as a disabled switch, even though there are no conditions. This seems like a bug and is confusing, as these both look the same on the dashboard. To make it consistent removing conditions actually removes them from this JSON object too now.
Also, fixed an issue with the javascript where it wouldn't show the correct "(Active for everyone)" label in this scenario as empty object in JavaScript is truthy ie. !!{} === true
When a SELECTIVE switch is freshly created and has no conditions, it is treated as active. However, once conditions are added and then removed, leaving no conditions, instead of the value being {}, it might be stored as something like this: {"auth.user": {"is_superuser": [], "is_staff": []}}. This will then effectively be treated as a disabled switch, even though there are no conditions. This seems like a bug and is confusing, as these both look the same on the dashboard. To make it consistent removing conditions actually removes them from this JSON object too now.
Also, fixed an issue with the javascript where it wouldn't show the correct "(Active for everyone)" label in this scenario as empty object in JavaScript is truthy ie. !!{} === true