Skip to content

Commit 78344d6

Browse files
committed
alternative
1 parent df7c2fc commit 78344d6

File tree

2 files changed

+2
-2
lines changed
  • apps/svelte.dev/scripts/sync-docs
  • packages/site-kit/src/lib/markdown

2 files changed

+2
-2
lines changed

apps/svelte.dev/scripts/sync-docs/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function get_types(code: string, statements: ts.NodeArray<ts.Statem
8989
.map(({ name, text }) => strip_origin(name ? `\`${name.escapedText}\`` : text))
9090
.join('');
9191
} else {
92-
comment = strip_origin(jsDoc.comment);
92+
comment = strip_origin(jsDoc.comment ?? '');
9393
}
9494

9595
if (jsDoc.tags) {

packages/site-kit/src/lib/markdown/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,5 @@ const parse = (str: string) => {
144144
* deployments and when developing locally
145145
*/
146146
export function strip_origin(str: string) {
147-
return str && str.replaceAll('https://svelte.dev', '');
147+
return str.replaceAll('https://svelte.dev', '');
148148
}

0 commit comments

Comments
 (0)