Skip to content

Commit

Permalink
Fix: no category item in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Jun 9, 2024
1 parent 12c3a58 commit 148e355
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/reducers/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ export const slice = createSlice({
state.selectedPolylineId = action.payload;
},
sync: (state, action) => {
const { name, sections, ...data } = action.payload as ISTKData;
const { name, sections, categories, ...data } = action.payload as ISTKData;
state.location = name ?? state.location;
state.sections = sections ? [noSection, ...sections] : state.sections;
state.categories = data.categories ? [noCategory, ...data.categories] : state.categories;
state.categories = categories ? [noCategory, ...categories] : state.categories;
state.initialViewBoxScale = data.workspace?.initialViewBoxScale;
state.initialViewBoxScaleForWidth = data.workspace?.initialViewBoxScaleForWidth;
state.visibilityOffset = data.workspace?.visibilityOffset ?? state.visibilityOffset;
Expand Down

0 comments on commit 148e355

Please sign in to comment.