Skip to content

Commit 51b089a

Browse files
committed
fix: correct error handling for non-string keys in YAML validation
1 parent e2ec264 commit 51b089a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workflow-parser/src/workflows/yaml-object-reader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class YamlObjectReader implements ObjectReader {
7777
if (isPair(node)) {
7878
const scalarKey = node.key as Scalar;
7979
range = this.getRange(scalarKey);
80-
const key = scalarKey.value as string;
80+
const key = scalarKey.value === null ? "" : String(scalarKey.value);
8181
yield new ParseEvent(EventType.Literal, new StringToken(this.fileId, range, key, undefined));
8282
for (const child of this.getNodes(node.value)) {
8383
yield child;

0 commit comments

Comments
 (0)