diff options
Diffstat (limited to 'client/components/lists/listBody.js')
-rw-r--r-- | client/components/lists/listBody.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 88b31788..25aeffcc 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -12,7 +12,7 @@ BlazeComponent.extendComponent({ options.position = options.position || 'top'; const forms = this.childrenComponents('inlinedForm'); - let form = _.find(forms, (component) => { + let form = forms.find((component) => { return component.data().position === options.position; }); if (!form && forms.length > 0) { @@ -26,7 +26,7 @@ BlazeComponent.extendComponent({ const firstCardDom = this.find('.js-minicard:first'); const lastCardDom = this.find('.js-minicard:last'); const textarea = $(evt.currentTarget).find('textarea'); - const title = textarea.val(); + const title = textarea.val().trim(); const position = this.currentData().position; let sortIndex; if (position === 'top') { @@ -35,7 +35,7 @@ BlazeComponent.extendComponent({ sortIndex = Utils.calculateIndex(lastCardDom, null).base; } - if ($.trim(title)) { + if (title) { const _id = Cards.insert({ title, listId: this.data()._id, |