You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reviewSchema.pre(/^findOneAnd/,asyncfunction(next){this.r=awaitthis.findOne();// console.log(this.r);next();});reviewSchema.post(/^findOneAnd/,asyncfunction(){// await this.findOne(); does NOT work here, query has already executedawaitthis.r.constructor.calcAverageRatings(this.r.tour);
The text was updated successfully, but these errors were encountered:
On Thu, May 18, 2023, 1:58 PM Mahmoud Ehab AbouDeghedy < ***@***.***> wrote:
TypeError: Cannot read property 'tour' of null\n at model.Query.
i got that error. Don't know what is wrong
which code u tried?
—
Reply to this email directly, view it on GitHub
<#190 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARMTYXRSO2VRPYKFC7EFHJDXGYMI3ANCNFSM6AAAAAAXHLM6I4>
.
You are receiving this because you commented.Message ID:
***@***.***>
instead of
The text was updated successfully, but these errors were encountered: