diff --git a/app/client/src/sagas/WidgetOperationSagas.tsx b/app/client/src/sagas/WidgetOperationSagas.tsx index e7f25ee31a..90ef0a20bc 100644 --- a/app/client/src/sagas/WidgetOperationSagas.tsx +++ b/app/client/src/sagas/WidgetOperationSagas.tsx @@ -707,6 +707,7 @@ export function calculateNewWidgetPosition( */ function* pasteWidgetSaga(action: ReduxAction<{ groupWidgets: boolean }>) { let copiedWidgetGroups: CopiedWidgetGroup[] = yield getCopiedWidgets(); + if (!copiedWidgetGroups.length) return; const shouldGroup: boolean = action.payload.groupWidgets; const newlyCreatedWidgetIds: string[] = []; diff --git a/app/client/src/utils/storage.ts b/app/client/src/utils/storage.ts index e578ea8946..91fb95a81b 100644 --- a/app/client/src/utils/storage.ts +++ b/app/client/src/utils/storage.ts @@ -66,6 +66,7 @@ export const getCopiedWidgets = async () => { log.error("An error occurred when fetching copied widget: ", error); return; } + return []; }; export const setOnboardingState = async (onboardingState: boolean) => {