message: Tweak URL logic in card service card url checking
diff: @@ -36,8 +36,8 @@ export class CardService {
  async create(raw: RawCard | Omit<RawCard, 'url'>, params: { realmURL: string }): Promise<Card>;
  async create(raw: RawCard | Omit<RawCard, 'url'>, params?: { realmURL: string }): Promise<Card> {
  let realmURL: string;
  - if (params && 'url' in raw) {
  - if (!raw.url.startsWith(params.realmURL)) {
  + if (params) {
  + if ('url' in raw && !raw.url.startsWith(params.realmURL)) {
  throw new Error(`realm mismatch. You tried to create card ${raw.url} in realm ${params.realmURL}`);
  }
  realmURL = params.realmURL;
  