Skip to content

Commit

Permalink
fix: Fix bug with executing query with null mapping/runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
travisstebbins committed Dec 11, 2024
1 parent 596de5d commit d6c34f5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/model/engine/ExecuteQueryInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import {
createModelSchema,
custom,
map,
optional,
primitive,
raw,
SKIP,
} from 'serializr';
Expand All @@ -46,9 +44,12 @@ export class V1_LSPExecuteInput {
static readonly serialization = new SerializationFactory(
createModelSchema(V1_LSPExecuteInput, {
lambda: usingModelSchema(V1_rawLambdaModelSchema),
mapping: optional(primitive()),
mapping: custom(
(val) => (val ? val : undefined),
() => SKIP,
),
runtime: custom(
(val) => (val ? V1_serializeRuntime(val) : SKIP),
(val) => (val ? V1_serializeRuntime(val) : undefined),
() => SKIP,
),
context: usingModelSchema(V1_rawBaseExecutionContextModelSchema),
Expand Down

0 comments on commit d6c34f5

Please sign in to comment.