0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 01:10:28 +01:00

Add additional check in feature counter

Dieser Commit ist enthalten in:
Angus McLeod 2023-10-04 13:45:57 +08:00
Ursprung 2dd3f5fa72
Commit 6472b2aaa2

Datei anzeigen

@ -56,7 +56,7 @@ module DiscoursePluginStatistics
} }
increment_feature_count = lambda do |type, key, value| increment_feature_count = lambda do |type, key, value|
if key == 'type' if key == 'type' && !subscription_features[type.to_sym][:type][value.to_sym].nil?
subscription_features[type.to_sym][:type][value.to_sym] += 1 subscription_features[type.to_sym][:type][value.to_sym] += 1
elsif !subscription_features[type.to_sym][key.to_sym].nil? elsif !subscription_features[type.to_sym][key.to_sym].nil?
subscription_features[type.to_sym][key.to_sym] += 1 subscription_features[type.to_sym][key.to_sym] += 1