Skip to content

Commit

Permalink
chore: fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
pubuzhixing8 committed Apr 21, 2024
1 parent d7fef9d commit 2351692
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/utils/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getTextManages = (element: PlaitElement) => {
export const getFirstTextManage = (element: PlaitElement) => {
const textManage = getTextManages(element)[0];
if (!textManage) {
throw new Error('can not find textManage');
console.warn('can not find textManage');
}
return textManage;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/mind/src/utils/node/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ExitOrigin } from '@plait/text';

export function editTopic(element: MindElement) {
const textManage = getFirstTextManage(element);
textManage.edit((origin: ExitOrigin) => {
textManage?.edit((origin: ExitOrigin) => {
if (origin === ExitOrigin.default) {
}
});
Expand Down

0 comments on commit 2351692

Please sign in to comment.