Skip to content

Commit

Permalink
fix: Fix bug
Browse files Browse the repository at this point in the history
- Correct order of array.concat
  • Loading branch information
DafyddLlyr committed Sep 26, 2024
1 parent b649aeb commit f31c81b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ export const previewStore: StateCreator<
if (passportValue.length > 0) {
const existingValue = acc.data?.[key] ?? [];

const combined = existingValue
.concat(passportValue)
const combined = passportValue
.concat(existingValue)
.reduce(
(acc: string[], curr: string, _i: number, arr: string[]) => {
if (!arr.some((x) => x !== curr && x.startsWith(curr))) {
Expand Down

0 comments on commit f31c81b

Please sign in to comment.