mirror of
https://github.com/wekan/wekan.git
synced 2026-02-21 07:24:07 +01:00
Return data on client (sync) and Promise on server (async) naturally, without wrapping in an extra Promise
This commit is contained in:
parent
2b15a8ff09
commit
f934aea2a5
21 changed files with 405 additions and 3760 deletions
|
|
@ -161,9 +161,8 @@ Checklists.helpers({
|
|||
await item.uncheck();
|
||||
}
|
||||
},
|
||||
async itemIndex(itemId) {
|
||||
const checklist = await ReactiveCache.getChecklist({ _id: this._id });
|
||||
const items = checklist.items;
|
||||
itemIndex(itemId) {
|
||||
const items = ReactiveCache.getChecklist({ _id: this._id }).items;
|
||||
return _.pluck(items, '_id').indexOf(itemId);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue