Skip to content

Commit 4d60675

Browse files
authored
chore: advanced checklist logic cleanup (#48)
* chore: remove unnecessary conditional from advanced checklist logic
1 parent 2b6b9e6 commit 4d60675

File tree

1 file changed

+5
-7
lines changed
  • packages/com.sncommunity.advanced-checklist/src/features/tasks

1 file changed

+5
-7
lines changed

packages/com.sncommunity.advanced-checklist/src/features/tasks/tasks-slice.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,11 @@ const tasksSlice = createSlice({
333333
groups: parsedState?.groups ?? [],
334334
}
335335

336-
if (newState !== initialState) {
337-
state.schemaVersion = newState.schemaVersion
338-
state.groups = newState.groups
339-
state.defaultSections = newState.defaultSections
340-
state.initialized = true
341-
delete state.lastError
342-
}
336+
state.schemaVersion = newState.schemaVersion
337+
state.groups = newState.groups
338+
state.defaultSections = newState.defaultSections
339+
state.initialized = true
340+
delete state.lastError
343341
} catch (error: any) {
344342
state.initialized = false
345343
state.lastError = `An error has occurred while parsing the note's content: ${error}`

0 commit comments

Comments
 (0)