Skip to content

Commit e9b7d40

Browse files
committed
fix code
1 parent dfa78fb commit e9b7d40

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/build/patches.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ function handleProperty(child: Node): Partial<Property> {
263263
}
264264

265265
function handleParam(node: Node) {
266-
const name = string(child.values[0]);
266+
const name = string(node.values[0]);
267267
let additionalTypes: string[] | undefined;
268-
268+
269269
for (const child of node.children) {
270270
switch (child.name) {
271271
case "additionalTypes": {
@@ -276,18 +276,14 @@ function handleParam(node: Node) {
276276
break;
277277
}
278278
default:
279-
throw new Error(`Unexpected child "${c.name}" in param "${name}"`);
279+
throw new Error(`Unexpected child "${child.name}" in param "${name}"`);
280280
}
281281
}
282-
282+
283283
return {
284284
name,
285-
...optionalMember("type", "string", c.properties?.type),
286-
...optionalMember(
287-
"overrideType",
288-
"string",
289-
c.properties?.overrideType,
290-
),
285+
...optionalMember("type", "string", node.properties?.type),
286+
...optionalMember("overrideType", "string", node.properties?.overrideType),
291287
additionalTypes,
292288
};
293289
}

0 commit comments

Comments
 (0)