Merge pull request #429 from OctupleSakura/grammar-optimization

refact: Small part of the grammar optimization
pull/435/head
Simon Friis Vindum 6 years ago committed by GitHub
commit ff59494649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,7 +55,7 @@ export const thunk = function thunk(sel: string, key?: any, fn?: any, args?: any
} }
return h(sel, { return h(sel, {
key: key, key: key,
hook: {init: init, prepatch: prepatch}, hook: {init, prepatch},
fn: fn, fn: fn,
args: args args: args
}); });

@ -42,8 +42,7 @@ export function vnode(sel: string | undefined,
text: string | undefined, text: string | undefined,
elm: Element | Text | undefined): VNode { elm: Element | Text | undefined): VNode {
let key = data === undefined ? undefined : data.key; let key = data === undefined ? undefined : data.key;
return {sel: sel, data: data, children: children, return {sel, data, children, text, elm, key};
text: text, elm: elm, key: key};
} }
export default vnode; export default vnode;

Loading…
Cancel
Save