Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/host/app/services/card-type-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
getAncestor,
SupportedMimeType,
isResolvedCodeRef,
cardIdToURL,
type ResolvedCodeRef,
} from '@cardstack/runtime-common';
import { isCodeRef, type CodeRef } from '@cardstack/runtime-common/code-ref';
Expand Down Expand Up @@ -121,7 +122,7 @@ export default class CardTypeService extends Service {
let moduleIdentifier = moduleFrom(ref);
let moduleInfo =
this.moduleInfoCache.get(moduleIdentifier) ??
(await this.fetchModuleInfo(new URL(moduleIdentifier)));
(await this.fetchModuleInfo(cardIdToURL(moduleIdentifier)));

let api = await loader.import<typeof CardAPI>(`${baseRealm.url}card-api`);
let { id: _remove, ...fields } = api.getFields(card, {
Expand Down
2 changes: 1 addition & 1 deletion packages/host/app/services/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@ async function withStubbedRenderTimers<T>(cb: () => Promise<T>): Promise<T> {
// - a directory
function resolveDocUrl(id?: string, realm?: string, local?: string) {
if (id) {
return id;
return isRegisteredPrefix(id) ? cardIdToURL(id).href : id;
}
if (!realm) {
throw new Error('Cannot resolve target url without a realm');
Expand Down
Loading