Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
fix: scheduling change defer
Browse files Browse the repository at this point in the history
  • Loading branch information
zeromake committed Aug 11, 2017
1 parent e8568d6 commit 7bbebb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { diff } from "./vdom/diff";
import { IVNode } from "./vnode";
import { IVDom } from "./vdom/index";
import { initDevTools } from "./devtools";
import { Scheduling } from "./util";
import { defer } from "./util";

declare const DEVTOOLS_ENV: string;
declare const ENV: string;
Expand All @@ -27,7 +27,7 @@ export function render(vnode: IVNode, parent: Element, vdom: IVDom): IVDom {
if (!window.ZREACT_DEV && !isScheduling && typeof window.Map === "function") {
// window.ZREACT_DEV();
isScheduling = true;
Scheduling.rIC(() => {
defer(() => {
window.ZREACT_DEV = initDevTools(newVDom);
isScheduling = false;
});
Expand Down

0 comments on commit 7bbebb7

Please sign in to comment.