Skip to content

Commit c231d13

Browse files
committedJan 22, 2025
fix lint
1 parent a6402ac commit c231d13

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed
 

Diff for: ‎packages/base/catalog-entry.gts

+12-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class CatalogEntry extends CardDef {
116116
private loadCardIcon = restartableTask(async () => {
117117
if (this.args.model.ref && this.args.model.id) {
118118
let card = await loadCard(this.args.model.ref, {
119-
loader: (import.meta as any).loader,
119+
loader: myLoader(),
120120
relativeTo: new URL(this.args.model.id),
121121
});
122122
this.icon = card.icon;
@@ -399,3 +399,14 @@ function getIcon(specType: string) {
399399
return;
400400
}
401401
}
402+
403+
function myLoader(): Loader {
404+
// we know this code is always loaded by an instance of our Loader, which sets
405+
// import.meta.loader.
406+
407+
// When type-checking realm-server, tsc sees this file and thinks
408+
// it will be transpiled to CommonJS and so it complains about this line. But
409+
// this file is always loaded through our loader and always has access to import.meta.
410+
// @ts-ignore
411+
return (import.meta as any).loader;
412+
}

0 commit comments

Comments
 (0)