Skip to content

Commit b669a0b

Browse files
FadhlanRlukemelia
andauthored
clean up cardHashes key
Co-authored-by: Luke Melia <luke@lukemelia.com>
1 parent edd6324 commit b669a0b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/base/room.gts

+3-5
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,9 @@ export class RoomField extends FieldDef {
615615
`Expected to find ${fragments[0].data.totalParts} fragments for fragment of event id ${eventId} but found ${fragments.length} fragments`,
616616
);
617617
}
618-
let cardDoc = JSON.parse(
619-
fragments.map((f) => f.data.cardFragment).join(''),
620-
) as LooseSingleCardDocument;
621-
622-
cardHashes.set(md5(JSON.stringify(cardDoc)), eventId);
618+
let cardSource = fragments.map((f) => f.data.cardFragment).join('');
619+
let cardDoc = JSON.parse(cardSource) as LooseSingleCardDocument;
620+
cardHashes.set(md5(cardSource), eventId);
623621
return cardDoc;
624622
}
625623

0 commit comments

Comments
 (0)