FIX: Don't search for tags if tagging is disabled.

This commit is contained in:
Guo Xiang Tan 2016-10-13 15:09:44 +08:00
parent ae0db10e2d
commit 06cbabb4da

View File

@ -235,6 +235,8 @@ export default Em.Component.extend({
},
findTags(searchTerm) {
if (!this.siteSettings.tagging_enabled) return;
const match = this.findSearchTerm(REGEXP_TAGS_PREFIX, searchTerm);
if (match.length !== 0) {
let existingInput = _.isArray(this.get('searchedTerms.tags')) ? this.get('searchedTerms.tags').join(',') : this.get('searchedTerms.tags');