Skip to content
Snippets Groups Projects
Commit fb460462 authored by Joren Van Onder's avatar Joren Van Onder
Browse files

[FIX] pos_restaurant: correctly pass arguments from overriden method

When overriding a method that calls its super later on, it's important
that arguments is used to correctly pass all arguments to the super.

Consider the following:

// module 1 (not correct)
method: function(a) {
    return _super.call(this, a);
}

// module 2 (correct)
method: function(a, b) {
    return _super.apply(this, arguments);
}

If the method of module 1 gets called first it will throw away the b
argument when it calls _super. Therefore the b argument will never
arrive in method of module 2.
parent 2616defe
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment