Skip to content

Commit a0a2b8f

Browse files
authored
fix: fix array duplication after parse (#238)
1 parent e7c4e69 commit a0a2b8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/parser.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,8 @@ class Parser {
774774
let resStore = {};
775775
if (this.options.removeUnusedKeys) {
776776
// Merge two objects `resStore` and `resScan` deeply, returning a new merged object with the elements from both `resStore` and `resScan`.
777-
const resMerged = deepMerge(this.resStore, this.resScan);
777+
const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray;
778+
const resMerged = deepMerge(this.resStore, this.resScan, { arrayMerge: overwriteMerge });
778779

779780
Object.keys(this.resStore).forEach((lng) => {
780781
Object.keys(this.resStore[lng]).forEach((ns) => {

0 commit comments

Comments
 (0)