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
undo: (steps=1)=>{// Fastest way to clone an array on Chromium. Needed to create a new array referenceconstpastStates=get().pastStates.slice();constfutureStates=get().futureStates.slice();if(pastStates.length){// Based on the steps, get values from the pastStates array and push them to the futureStates arrayfor(leti=0;i<steps;i++){constpastState=pastStates.pop();if(pastState){futureStates.push(options?.partialize?.(userGet())||userGet());userSet(pastState);}}set({ pastStates, futureStates });}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: