Skip to content

Commit 033f736

Browse files
Merge pull request #1336 from opencomponents/fetch-support
add support for global fetch on components
2 parents 129b41b + 6042c9a commit 033f736

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)