Професионална програма
Loading...
+ Нов въпрос
aivian avatar aivian 51 Точки

Защо this е празен в remove middleware?

Имам следната схема и middleware за собственик: http://pastebin.com/JTSS0zc3

Хващам request - а с този код: http://pastebin.com/rYScSiVQ

Като изтрия собственик, влиза в middleware - а, но ми казва, че this е празен обект, а уж би трябвало this - а да ми е документа, който съм изтеглил от базата. Някой знае ли защо се получава така?

Тагове:
0
Express.js Web Development
KrasiNedew avatar KrasiNedew 65 Точки

Пробвай да замениш arrow function-a с обикновен.

(function (params) {} вместо (params) => {})
Имал съм случаи, в които this се държи различно с arrow function-ите (като се замисля, всеки случай, в който this e динамичен).

1
28/10/2016 19:02:07
aivian avatar aivian 51 Точки

Оправи се. Мерси.

0
lavernwalter avatar lavernwalter 1 Точки

My life had found its missing piece
So as long as I live I love you
Will have and hold you  run 3

 
 

 

0
MollyEskam avatar MollyEskam 1 Точки

Offshore Hosting with 100% DMCA ignored Hosting, Offshore Dedicated Server, Offshore VPS Hosting. offshorededi is the Most Secure Offshore Host.

0
monicaphillipa avatar monicaphillipa 2 Точки

Yea this happened with me too, When I was writing the code for a professional SEO services provider. But now that I took the code that the guy gave me in the comments it worked and now things look pretty good to me. Thanks for helping. It means a lot and if anyone of you needs any help in regards to SEO let me know.

0
GreysonAustin avatar GreysonAustin 0 Точки

Really very happy to say, your post is very interesting to read. I never stop myself to say something about it. You’re doing a great job.Keep it up

office.com/setup

 

0
walter821 avatar walter821 2 Точки

Excellent post. Please keep up the great work. You may check our website also Visit: free fonts

0
yogitiger avatar yogitiger 1 Точки

For Download and install the full version of Microsoft Office on your device.Please Follow the direct download link and instructions for guidance on installing Microsoft Office 365 on your computer for more click office.com/setup

0
MollyEskam avatar MollyEskam 1 Точки

Offshore Hosting with 100% DMCA ignored Hosting, Offshore Dedicated Server, Offshore VPS Hosting.

0
paultroy122 avatar paultroy122 2 Точки

Very informative post! This post gives truly quality information. I find that this post is really amazing. Thank you for this brief explanation and very nice information. hope to see you again. Office.com/setup | Mcafee.com/activate

0
Gome2z avatar Gome2z 1 Точки

Nice post, thanks for sharing the info regarding this topic mcdvoice

0
dZf1aeA-minion89 avatar dZf1aeA-minion89 9 Точки

The article is very meticulous and insightful. it provided me with a fair amount of knowledge. help a lot for my work.
bubble shooter

0