webix-hub / webix

Stable releases of Webix UI - JavaScript library for building mobile and desktop web apps

Home Page:http://webix.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webix.once is not passing arguments.

plandem opened this issue · comments

current implementation:

webix.once=function(method){
    var flag = true;
    return function(){
        if (flag){
            flag = false;
            method.apply(this, arguments);
        }
    };
};

in that case arguments will be always empty array. looks like you wanted this:

webix.once=function(method){
    var flag = true;
        var args = arguments;
    return function(){
        if (flag){
            flag = false;
            method.apply(this, args);
        }
    };
};