Skip to content

Commit d96cbb3

Browse files
fix generate script
1 parent 0d12a20 commit d96cbb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/generate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function buildClasses(classes: {
157157
if (name && description && externalDocs) {
158158
output += `\n/**\n* ${name}\n*\n* ${description}\n*\n* ${externalDocs.description}\n* ${externalDocs.url}\n*/\n`;
159159
}
160-
output += `public readonly ${x} = {
160+
output += `public readonly ${x.split(' ').join('_')} = {
161161
${functions.join("\n,")}
162162
};`;
163163
});
@@ -255,7 +255,7 @@ import { OAuth2Bearer } from "../auth";\n\n`;
255255

256256
if (!tags?.length) throw "No tags found";
257257
const tag = tags[0].toLowerCase();
258-
classes[tag].functions.push(
258+
classes[tag]?.functions.push(
259259
functionDocs(
260260
summary,
261261
description,

0 commit comments

Comments
 (0)