Skip to content

Commit

Permalink
improve some internals
Browse files Browse the repository at this point in the history
  • Loading branch information
huang2002 committed Jan 31, 2019
1 parent 012e96a commit 8ed2362
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/render.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { toNodeArr, HNode } from "./HNode";
import { _document, _assign, _from } from "../utils/refCache";
import { _document, _assign, _from, _create, _null } from "../utils/refCache";
import { createStore, Store, StoreType, StoreHandlers, HandlerMap } from "./Store";
import { toFrag } from "../utils/helpers";
import { DeferCallback, reqTick, willTick } from "../ticker/ticker";
Expand All @@ -17,7 +17,7 @@ export interface RenderOptions<C extends Store = Store> {
}

export const renderToDOM = function render<C extends Store = Store>(
src: any, options: RenderOptions<C> = {}
src: any, options: RenderOptions<C> = _create(_null)
) {

const { parent = _document.body,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/refCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const _document = document,
_console = console,
{ now: _now } = Date,
_requestAnimationFrame = requestAnimationFrame,
{ assign: _assign, is: _is, keys: _keys, entries: _entries } = _Object,
{ assign: _assign, is: _is, keys: _keys, entries: _entries, create: _create } = _Object,
{ toString: _toString, hasOwnProperty: _hasOwnProperty } = _Object.prototype,
{ isArray: _isArray, from: _from } = _Array,
{ splice: _splice, push: _push, indexOf: _indexOf } = _Array.prototype,
Expand Down

0 comments on commit 8ed2362

Please sign in to comment.