Commit c0f4fe06 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett Committed by Alfredo Sumaran

Remove unneeded prevention code

parent f4f18f7b
...@@ -56,11 +56,9 @@ ...@@ -56,11 +56,9 @@
}, },
filter: function(query, data, searchKey) { filter: function(query, data, searchKey) {
if (gl.GfmAutoComplete.isLoading(data)) { if (gl.GfmAutoComplete.isLoading(data)) {
gl.GfmAutoComplete.togglePreventSelection.call(this, true);
gl.GfmAutoComplete.fetchData(this.$inputor, this.at); gl.GfmAutoComplete.fetchData(this.$inputor, this.at);
return data; return data;
} else { } else {
gl.GfmAutoComplete.togglePreventSelection.call(this, false);
return $.fn.atwho["default"].callbacks.filter(query, data, searchKey); return $.fn.atwho["default"].callbacks.filter(query, data, searchKey);
} }
}, },
...@@ -205,7 +203,6 @@ ...@@ -205,7 +203,6 @@
sorter: this.DefaultOptions.sorter, sorter: this.DefaultOptions.sorter,
beforeInsert: this.DefaultOptions.beforeInsert, beforeInsert: this.DefaultOptions.beforeInsert,
filter: this.DefaultOptions.filter, filter: this.DefaultOptions.filter,
sorter: this.DefaultOptions.sorter,
beforeSave: function(milestones) { beforeSave: function(milestones) {
return $.map(milestones, function(m) { return $.map(milestones, function(m) {
if (m.title == null) { if (m.title == null) {
...@@ -372,11 +369,7 @@ ...@@ -372,11 +369,7 @@
if (!data || !data.length) return false; if (!data || !data.length) return false;
if (Array.isArray(data)) data = data[0]; if (Array.isArray(data)) data = data[0];
return data === this.defaultLoadingData[0] || data.name === this.defaultLoadingData[0]; return data === this.defaultLoadingData[0] || data.name === this.defaultLoadingData[0];
}, }
togglePreventSelection(isPrevented = !!this.setting.tabSelectsMatch) {
this.setting.tabSelectsMatch = !isPrevented;
this.setting.spaceSelectsMatch = !isPrevented;
},
}; };
}).call(this); }).call(this);
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