Skip to content

Commit 4b41504

Browse files
committed
CardService instance creation warning
1 parent 05d4cb6 commit 4b41504

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/host/app/services/card-service.ts

+4
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export default class CardService extends Service {
147147
return;
148148
}
149149

150+
// WARNING! please do not use this to create card instances. Use
151+
// `CardResource.getCard()` instead for creating card instances. When you
152+
// create card instances directly from here it bypasses the store's identity
153+
// map and instances created directly from here will behave very problematically.
150154
async createFromSerialized(
151155
resource: LooseCardResource,
152156
doc: LooseSingleCardDocument | CardDocument,

0 commit comments

Comments
 (0)