Skip to content

Commit

Permalink
Merge pull request #1400 from tradingview/dont-merge-arrays
Browse files Browse the repository at this point in the history
internal: dont merge array contents
  • Loading branch information
SlicedSilver committed Aug 16, 2023
2 parents 174f6c3 + 65b8fe1 commit c0e6ac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ module.exports = [
{
name: 'CJS',
path: 'dist/lightweight-charts.production.cjs',
limit: '47.58 KB',
limit: '47.59 KB',
},
{
name: 'ESM',
path: 'dist/lightweight-charts.production.mjs',
limit: '47.53 KB',
limit: '47.54 KB',
},
{
name: 'Standalone-ESM',
path: 'dist/lightweight-charts.standalone.production.mjs',
limit: '49.25 KB',
limit: '49.26 KB',
},
{
name: 'Standalone',
path: 'dist/lightweight-charts.standalone.production.js',
limit: '49.3 KB',
limit: '49.31 KB',
},
];
2 changes: 1 addition & 1 deletion src/helpers/strict-type-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function merge(dst: Record<string, any>, ...sources: Record<string, any>[
continue;
}

if ('object' !== typeof src[i] || dst[i] === undefined) {
if ('object' !== typeof src[i] || dst[i] === undefined || Array.isArray(src[i])) {
dst[i] = src[i];
} else {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
Expand Down

0 comments on commit c0e6ac4

Please sign in to comment.