Skip to content

Commit 6042c9a

Browse files
add support for global fetch on components
1 parent 129b41b commit 6042c9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/registry/routes/helpers/get-component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,8 @@ export default function getComponent(conf: Config, repository: Repository) {
526526
exports: {} as Record<string, (...args: any[]) => any>,
527527
console: conf.local ? console : noopConsole,
528528
setTimeout,
529-
Buffer
529+
Buffer,
530+
fetch: globalThis?.fetch
530531
};
531532

532533
const handleError = (err: {

0 commit comments

Comments
 (0)