From 0a490ac1641cdb1f5502b44c20fcf3295be2e55e Mon Sep 17 00:00:00 2001 From: zxypro1 <1018995004@qq.com> Date: Thu, 1 Feb 2024 14:44:14 +0800 Subject: [PATCH] fix: type error when doFlow Signed-off-by: zxypro1 <1018995004@qq.com> --- README.md | 2 +- packages/parse-spec/src/order.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa498cdc..d3164dfd 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ npm run test #测试 ### 本地beta发布测试 - 修改package.json中的版本号,格式为`x.x.x-beta.x(如0.0.1-beta.1)` -- 使用`npm publish --tag=beta`发布到npm。 +- 使用`pnpm publish --tag=beta`发布到npm。 ### 发布到npm diff --git a/packages/parse-spec/src/order.ts b/packages/parse-spec/src/order.ts index d44414b0..e0a78842 100644 --- a/packages/parse-spec/src/order.ts +++ b/packages/parse-spec/src/order.ts @@ -1,4 +1,4 @@ -import { includes, map, split, set, sortBy, isEmpty, get, cloneDeep, unset } from 'lodash'; +import { includes, map, split, set, sortBy, isEmpty, get, cloneDeep, unset, isObject } from 'lodash'; import { REGXG } from './contants'; import { IStep } from './types'; const debug = require('@serverless-cd/debug')('serverless-devs:parse-spec'); @@ -67,7 +67,7 @@ class Order { } } } - result[i] = typeof val === 'object' ? deepCopy(val) : val; + result[i] = isObject(val) ? deepCopy(val) : val; } } else { result = obj;