Skip to content

Commit

Permalink
remove extra add page check
Browse files Browse the repository at this point in the history
  • Loading branch information
alextaing committed Sep 22, 2023
1 parent 53ea64b commit 35ebb8d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/studio-ui/src/store/slices/createPageSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ const initialStates: PageSliceStates = {
export const createPageSlice: SliceCreator<PageSlice> = (set, get) => {
const pageActions = {
addPage: (pageName: string, page: PageState) => {
if (get().pages[pageName]) {
throw new Error(`Page name "${pageName}" is already used.`);
}

set((store) => {
store.pages[pageName] = page;
Expand Down

0 comments on commit 35ebb8d

Please sign in to comment.