chore(workflows-sdk, utils): Prevent unnecessary serialization (#13413)
* chore(workflows-sdk, utils): Prevent unnecessary serialization * Create poor-mugs-cheat.md
This commit is contained in:
committed by
GitHub
parent
bd571aca82
commit
55a35e4721
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
deepCopy,
|
||||
isDefined,
|
||||
OrchestrationUtils,
|
||||
parseStringifyIfNecessary,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
|
||||
@@ -83,8 +83,5 @@ export async function resolveValue(input, transactionContext) {
|
||||
? await resolveProperty(copiedInput, transactionContext)
|
||||
: await unwrapInput(copiedInput, {})
|
||||
|
||||
const strResult = JSON.stringify(result) // Symbols return undefined
|
||||
if (isDefined(strResult)) {
|
||||
return JSON.parse(strResult)
|
||||
}
|
||||
return parseStringifyIfNecessary(result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user