Skip to content

Commit

Permalink
feat: make ID optional in History type (breaking change)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Sep 9, 2024
1 parent 6bcbeb4 commit d917229
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions packages/core/lib/__tests__/use-puck-history.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe("use-puck-history", () => {
test("back function calls dispatch when there is a history", () => {
historyStore.hasPast = true;
historyStore.prevHistory = {
id: "",
data: {
...defaultAppState,
ui: { ...defaultAppState.ui, leftSideBarVisible: false },
Expand Down Expand Up @@ -80,7 +79,6 @@ describe("use-puck-history", () => {

test("forward function calls dispatch when there is a future", () => {
historyStore.nextHistory = {
id: "",
data: {
...defaultAppState,
ui: { ...defaultAppState.ui, leftSideBarVisible: false },
Expand Down
2 changes: 1 addition & 1 deletion packages/core/types/API/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type Plugin = {

export type History<D = any> = {
data: D;
id: string;
id?: string;
};

export type InitialHistory<AS = AppState> = {
Expand Down

0 comments on commit d917229

Please sign in to comment.