Skip to content

A platform for community discussion. Free, open, simple.

FIX: changing tag group privacy setting was not consistent (#5818)

Arpit Jalan51ee31b3eb07
diff --git a/app/assets/javascripts/discourse/components/radio-button.js.es6 b/app/assets/javascripts/discourse/components/radio-button.js.es6
index 3004f941068..252f7d7ac4c 100644
--- a/app/assets/javascripts/discourse/components/radio-button.js.es6
+++ b/app/assets/javascripts/discourse/components/radio-button.js.es6
@@ -5,8 +5,12 @@ export default Ember.Component.extend({
type : "radio",
attributeBindings : ["name", "type", "value", "checked:checked", "disabled:disabled"],
- click: function() {
- this.set("selection", this.$().val());
+ click() {
+ const value = this.$().val();
+ if (this.get("selection") === value) {
+ this.set("selection", undefined);
+ }
+ this.set("selection", value);
},
@computed('value', 'selection')