File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/app/src/app/overmind/namespaces/profile Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ export const reorderFeaturedSandboxesInState: Action<{
305305
306306 // optimisic update
307307 const featuredSandboxes = [ ...state . profile . current . featuredSandboxes ] ;
308- const sandbox = featuredSandboxes . find ( ( _ , index ) => index === startPosition ) ;
308+ const sandbox = featuredSandboxes [ startPosition ] ! ;
309309
310310 // remove element first
311311 featuredSandboxes . splice ( startPosition , 1 ) ;
@@ -320,6 +320,8 @@ export const saveFeaturedSandboxesOrder: AsyncAction = async ({
320320 effects,
321321 state,
322322} ) => {
323+ if ( ! state . profile . current ) return ;
324+
323325 try {
324326 const featuredSandboxIds = state . profile . current . featuredSandboxes . map (
325327 s => s . id
You can’t perform that action at this time.
0 commit comments