Skip to content

Commit 6bc1422

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(oracle-fusion): use shared record utility in request serializer
1 parent 0030a36 commit 6bc1422

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎apps/sim/lib/internal/oracle-fusion/request-body.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isRecordLike } from '@sim/utils/object'
12
import { MAX_INLINE_MATERIALIZATION_BYTES } from '@/lib/execution/payloads/limits'
23

34
const MAX_JSON_NESTING_DEPTH = 100
@@ -170,10 +171,6 @@ function serializeJsonBodyWithinLimit(body: unknown): JsonBudgetState {
170171
return state
171172
}
172173

173-
function isRecordLike(value: unknown): value is Record<string, unknown> {
174-
return typeof value === 'object' && value !== null && !Array.isArray(value)
175-
}
176-
177174
function rejectInheritedJsonSerialization(prototype: object | null): void {
178175
for (let candidate = prototype; candidate; candidate = Object.getPrototypeOf(candidate)) {
179176
if (Object.hasOwn(candidate, 'toJSON')) throwNonPlainJsonError()

0 commit comments

Comments
 (0)