Commit 6546c3ae authored by Bryce Johnson's avatar Bryce Johnson

Only fetchIssuable on changes to subscribed commands.

parent 573a6569
......@@ -45,7 +45,10 @@
},
listenForSlashCommands() {
$(document).on('ajax:success', '.gfm-form', (e, data) => {
if (data.commands_changes !== null) {
const subscribedCommands = ['spend_time', 'time_estimate'];
const changedCommands = data.commands_changes;
if (changedCommands && _.intersection(subscribedCommands, changedCommands).length) {
this.fetchIssuable();
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment