mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
settings: Fix exception on updating bot_creation_policy.
This initializes the bot_creation_policy_values after the page is loaded. Previously we initialize these values in `settings.js` when settings page is loaded at least once, so if we open two tabs, one(1) in which we haven't opened the settings page yet and if in another tab (2) we update the `bot_creation_policy` value, then because of the event which calls `settings_bots.update_bot_permissions_ui` causes exception in (1) because `bot_creation_policy_values` isn't initialized yet. Fixes: #8852.
This commit is contained in:
committed by
Tim Abbott
parent
9f2a3c2921
commit
b580c62bd4
@@ -122,7 +122,6 @@ function _setup_page() {
|
||||
}());
|
||||
|
||||
setup_settings_label();
|
||||
settings_bots.setup_bot_creation_policy_values();
|
||||
|
||||
var settings_tab = templates.render('settings_tab', {
|
||||
full_name: people.my_full_name(),
|
||||
|
||||
@@ -16,6 +16,8 @@ function _initialize() {
|
||||
failure: i18n.t("Save failed"),
|
||||
saving: i18n.t("Saving"),
|
||||
};
|
||||
|
||||
settings_bots.setup_bot_creation_policy_values();
|
||||
}
|
||||
|
||||
exports.initialize = function () {
|
||||
|
||||
Reference in New Issue
Block a user