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, {
key: key,
hook: {init: init, prepatch: prepatch},
hook: {init, prepatch},
fn: fn,
args: args
});

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

Loading…
Cancel
Save