Skip to content

Commit

Permalink
fix: 移除不必要的 toJS 调用,直接返回 store
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Feb 1, 2025
1 parent 3f72dd2 commit 7d24aed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MarkdownEditor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { observable, toJS } from 'mobx';
import { observable } from 'mobx';
import React, {
ReactNode,
useContext,
Expand Down Expand Up @@ -360,7 +360,7 @@ export const MarkdownEditor: React.FC<MarkdownEditorProps> = (props) => {
// 导入外部 hooks
useImperativeHandle(editorRef, () => {
return {
...toJS(instance),
store: instance.store,
markdownContainerRef,
markdownEditorRef,
};
Expand Down

1 comment on commit 7d24aed

@vercel
Copy link

@vercel vercel bot commented on 7d24aed Feb 1, 2025

Choose a reason for hiding this comment

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

Please sign in to comment.