diff options
Diffstat (limited to 'client/components/lists/body.js')
-rw-r--r-- | client/components/lists/body.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/components/lists/body.js b/client/components/lists/body.js index a91f0ca9..27864474 100644 --- a/client/components/lists/body.js +++ b/client/components/lists/body.js @@ -27,10 +27,12 @@ BlazeComponent.extendComponent({ var title = textarea.val(); var position = Blaze.getData(evt.currentTarget).position; var sortIndex; + var firstCard = this.find('.js-minicard:first'); + var lastCard = this.find('.js-minicard:last'); if (position === 'top') { - sortIndex = Utils.getSortIndex(null, this.find('.js-minicard:first')); + sortIndex = Utils.calculateIndex(null, firstCard).base; } else if (position === 'bottom') { - sortIndex = Utils.getSortIndex(this.find('.js-minicard:last'), null); + sortIndex = Utils.calculateIndex(lastCard, null).base; } if ($.trim(title)) { |