Answer the question
In order to leave comments, you need to log in
Change tracking and what are the reasons for this behavior of the constructor?
Good afternoon,
There are 2 questions:
1) Is it possible to somehow track the moment when someone changes the document in Mongo and find out where the call comes from? It is not possible to set the source of the change and correct the changes made
2) What is the reason for this behavior of the constructor (the line under the breakpoint):
As you can see in the debug mode, despite the fact that options.index exists and equals 0, the default value -1 is stored in the object.
Answer the question
In order to leave comments, you need to log in
2) Because !!0 === true
You should use:
Or from ES6 instead of the top line (default params - something like that is called (and MB is not, I don’t remember))
function Element({ desk = 'deck0', index = -1, speed = 0, curATB = 0, canMove = false })
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question