From 873b30ac6512ce9c527e4cb0700443d545bb3d63 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Thu, 25 Mar 2021 11:33:12 +0530 Subject: [PATCH] improved code structure --- .../wizard/components/similar-topics-validator.js.es6 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/wizard/components/similar-topics-validator.js.es6 b/assets/javascripts/wizard/components/similar-topics-validator.js.es6 index 6081fdfa..1a718514 100644 --- a/assets/javascripts/wizard/components/similar-topics-validator.js.es6 +++ b/assets/javascripts/wizard/components/similar-topics-validator.js.es6 @@ -21,9 +21,6 @@ export default WizardFieldValidator.extend({ showDefault: computed('hasNotSearched', 'hasInput', 'typing', function() { return this.hasInput && (this.hasNotSearched || this.typing); }), - insufficientCharacters: computed('typing', 'field.value', function() { - return this.hasInput && this.field.value.length < 5 && !this.typing; - }), showSimilarTopics: computed('typing', 'hasSimilarTopics', function() { return this.hasSimilarTopics && !this.typing; }), @@ -31,6 +28,9 @@ export default WizardFieldValidator.extend({ return this.noSimilarTopics && !this.typing; }), hasValidationCategories: notEmpty('validationCategories'), + insufficientCharacters: computed('typing', 'field.value', function() { + return this.hasInput && this.field.value.length < 5 && !this.typing; + }), insufficientCharactersCategories: and('insufficientCharacters', 'hasValidationCategories'), @discourseComputed('validation.categories')