Answer the question
In order to leave comments, you need to log in
Problem with async?
var cache = {
order: null
}
cache.order = order; // тут order.status = "progress"
// мне надо присвоить в cache.order полностью объект order но оно успевает присвоить статусу значение open
// как дождаться пока оно присвоит а потом менять значения?
order.invitedPerformers = order.invitedPerformersCache;
order.performer = null;
order.status = "open";
Answer the question
In order to leave comments, you need to log in
Cloning the object completely will not work. All variables will store references to the object. You can clone an object using a loop.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question