You just need to clone the moment first before modifying it. Use either current.clone().whatever... or moment(current).whatever.... They both do the same thing.
This is necessary because moments are mutable.
You just need to clone the moment first before modifying it. Use either current.clone().whatever... or moment(current).whatever.... They both do the same thing.
This is necessary because moments are mutable.