use [].concat, not Ox.merge
This commit is contained in:
parent
36d0162b8b
commit
1c40fb007b
27 changed files with 87 additions and 90 deletions
|
|
@ -28,7 +28,7 @@ Ox.cache = function(fn, options) {
|
|||
if (options.async) {
|
||||
if (!(key in cache)) {
|
||||
// call function with patched callback
|
||||
fn.apply(this, Ox.merge(Ox.sub(args, 0, -1), callback));
|
||||
fn.apply(this, args.slice(0, -1).concat(callback));
|
||||
} else {
|
||||
// call callback with cached arguments
|
||||
callback.apply(this, cache[key])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue