avoid unnecessary call()
This commit is contained in:
parent
2aa8e41828
commit
80ed641d69
1 changed files with 2 additions and 4 deletions
|
@ -72,10 +72,8 @@ var interpolate = func(node, val...) {
|
||||||
#
|
#
|
||||||
var setlistener = func(node, fun, init = 0, runtime = 1) {
|
var setlistener = func(node, fun, init = 0, runtime = 1) {
|
||||||
if(isa(node, props.Node)) node = node._g;
|
if(isa(node, props.Node)) node = node._g;
|
||||||
var id = _setlistener(node, func {
|
var id = _setlistener(node, func(chg, lst, mode, is_child) {
|
||||||
arg[0] = props.wrapNode(arg[0]);
|
fun(props.wrapNode(chg), props.wrapNode(lst), mode, is_child);
|
||||||
arg[1] = props.wrapNode(arg[1]);
|
|
||||||
call(fun, arg);
|
|
||||||
}, init, runtime);
|
}, init, runtime);
|
||||||
if(__.log_level <= 2) {
|
if(__.log_level <= 2) {
|
||||||
var c = caller(1);
|
var c = caller(1);
|
||||||
|
|
Loading…
Reference in a new issue