Skip to content

Commit

Permalink
fix(core): unexpected re-render in edgeless (#7077)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed May 27, 2024
1 parent 2d2a849 commit 306cf2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ export const BlocksuiteEditorContainer = forwardRef<
return;
}
if (selection[0]?.type !== 'block') {
return currentView.history.replace(currentPath);
if (locationHash) {
// Clear the hash if no block is selected
currentView.replace(currentPath);
}
return;
}

const selectedId = selection[0]?.blockId;
Expand All @@ -270,7 +274,7 @@ export const BlocksuiteEditorContainer = forwardRef<

// Only update the hash if it has changed
if (locationHash !== newHash) {
currentView.history.replace(currentPath + newHash);
currentView.replace(currentPath + newHash);
}
};
affineEditorContainerProxy.updateComplete
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/graphql/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ export interface CreateCheckoutSessionInput {
successCallbackLink: InputMaybe<Scalars['String']['input']>;
}

export interface DeleteSessionInput {
docId: Scalars['String']['input'];
sessionIds: Array<Scalars['String']['input']>;
workspaceId: Scalars['String']['input'];
}

export enum EarlyAccessType {
AI = 'AI',
App = 'App',
Expand Down

0 comments on commit 306cf2a

Please sign in to comment.