Skip to content

Commit

Permalink
šŸ› fixed another regression in meteor.js version 3.1 causing the detaiā€¦
Browse files Browse the repository at this point in the history
ā€¦ls filters to not work properly
  • Loading branch information
faburem committed Dec 2, 2024
1 parent ae3d182 commit 32531b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions imports/api/users/server/publications.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,14 @@ Meteor.publish('projectResources', async function projectResources({ projectId }
})
handle = await Timecards.find(selector).observeChangesAsync({
added: async (_id) => {
let newUserId = await Timecards.findOneAsync(_id)
newUserId = newUserId?.userId
if (!userIds.includes(newUserId)) {
let newUser = await Timecards.findOneAsync(_id)
if (!userIds.includes(newUser?.userId)) {
let meteorUser = await Meteor.users
.findOneAsync({ _id: newUserId, inactive: { $ne: true } }, { profile: 1 })
.findOneAsync({ _id: newUser?.userId, inactive: { $ne: true } }, { profile: 1 })
meteorUser = meteorUser?.profile
if (meteorUser) {
userIds.push(newUserId)
this.added('projectResources', newUserId)
if (meteorUser && newUser?.userId) {
userIds.push(newUser.userId)
this.added('projectResources', newUser.userId, newUser)
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "titra",
"version": "0.99.25",
"version": "0.99.26",
"private": true,
"scripts": {
"start": "meteor run"
Expand Down

0 comments on commit 32531b3

Please sign in to comment.