Skip to content

Commit d98ceed

Browse files
fix optimistic issue
1 parent 01b4a81 commit d98ceed

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/app/src/app/overmind/namespaces/comments/actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ export const addComment: AsyncAction<{
340340
if (isOptimistic) {
341341
optimisticComment = {
342342
...state.comments.comments[sandboxId][OPTIMISTIC_COMMENT_ID],
343+
content,
343344
id,
344345
};
345346
state.comments.comments[sandboxId][id] = optimisticComment;

packages/app/src/app/overmind/namespaces/editor/actions.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,6 @@ export const forkExternalSandbox: AsyncAction<{
529529
try {
530530
const forkedSandbox = await effects.api.forkSandbox(sandboxId, body);
531531

532-
// We currently have to delete the comments due to smooth forking. This will get better
533-
// with EditorSandbox class
534-
delete state.comments.comments[sandboxId];
535532
state.editor.sandboxes[forkedSandbox.id] = forkedSandbox;
536533
effects.router.updateSandboxUrl(forkedSandbox, { openInNewWindow });
537534
} catch (error) {

0 commit comments

Comments
 (0)