Skip to content
Snippets Groups Projects
Commit 3a6fc979 authored by chris's avatar chris
Browse files

fix waxView mounted

parent 5a92fcdc
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,6 @@ const WaxView = forwardRef((props, ref) => {
scrollThreshold,
} = props;
const [mounted, setMounted] = useState(false);
const context = useContext(WaxContext);
const { createPortal } = useContext(PortalContext);
......@@ -55,11 +54,9 @@ const WaxView = forwardRef((props, ref) => {
const setEditorRef = useCallback(
node => {
if (node) {
if (!mounted) {
context.app.bootServices();
context.app.getShortCuts();
context.app.getRules();
}
context.app.bootServices();
context.app.getShortCuts();
context.app.getRules();
const options = WaxOptions({
...props,
......@@ -84,8 +81,6 @@ const WaxView = forwardRef((props, ref) => {
},
);
setMounted(true);
context.updateView(
{
main: view,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment