Skip to content

Commit

Permalink
fix(settings): fix setting external converters and passlist not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jun 4, 2024
1 parent 8a50b8d commit cb2b887
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const download = async (data: Record<string, unknown>, filename: string)
}

export const computeSettingsDiff = (before: object, after: object) => {
const diffObj = diff(before, after);
let diffObj = diff(before, after);

// diff converts arrays to objects, set original array back here
const setArrays = (localAfter: object, localDiff: object): void => {
Expand All @@ -149,7 +149,12 @@ export const computeSettingsDiff = (before: object, after: object) => {
}
}
}
setArrays(after, diffObj);
if (Array.isArray(after)) {
diffObj = after;
} else {
setArrays(after, diffObj);
}

return diffObj;
}

Expand Down

0 comments on commit cb2b887

Please sign in to comment.