Skip to content
Open
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
2 changes: 1 addition & 1 deletion packages/host/app/services/recent-cards-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class RecentCardsService extends Service {
add(newId: string) {
if (isLocalId(newId)) {
let instance = this.store.peek(newId);
if (isCardInstance(instance)) {
if (isCardInstance(instance) && instance.id && !isLocalId(instance.id)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep subscribing when local cards have no remote id

Do not gate addNewCard on instance.id here: when add() is called with a local stack ID for a newly created card, the instance commonly has id === undefined (only localId is set). Before this change, addNewCard() handled that case by subscribing to id changes and adding the remote ID once assigned; now the call is skipped entirely, so the card never gets into recent cards (and optional recent-files propagation never occurs) after first save.

Useful? React with 👍 / 👎.

this.addNewCard(instance);
}
return;
Expand Down
Loading