We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d42564 commit 1de2f87Copy full SHA for 1de2f87
packages/sql-drizzle/src/internal/patch.ts
@@ -49,11 +49,13 @@ export const makeRemoteCallback = Effect.gen(function*() {
49
const runPromise = Runtime.runPromise(currentRuntime ? currentRuntime : constructionRuntime)
50
51
const finalParams = params.map((e) => {
52
+ if (e === null || e === undefined) return e
53
+ if (typeof e !== "string") return e
54
+ const s = e.trim()
55
+ if (!(s.startsWith("{") || s.startsWith("["))) return e
56
try {
- if (e) {
- return JSON.parse(e)
- }
- } catch (err) {
57
+ return JSON.parse(s)
58
+ } catch {
59
return e
60
}
61
})
0 commit comments