Skip to content

Commit 2a079fc

Browse files
committed
fix: call mergeManifest only for objects
1 parent 63fe82e commit 2a079fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/generate-clients/copy-to-clients.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const getOverwritablePredicate = (packageName) => (pathName) => {
4141
const mergeManifest = (fromContent = {}, toContent = {}) => {
4242
const merged = {};
4343
for (const name of Object.keys(fromContent)) {
44-
if (typeof fromContent[name] === "object") {
44+
if (fromContent[name].constructor.name === "Object") {
4545
merged[name] = mergeManifest(fromContent[name], toContent[name]);
4646
if (name === "scripts" || name === "devDependencies") {
4747
// Allow target package.json(toContent) has its own special script or

0 commit comments

Comments
 (0)