1
0
Fork 0
forked from 0x2620/oxjs

use [].concat, not Ox.merge

This commit is contained in:
rolux 2012-05-24 09:45:33 +02:00
commit 1c40fb007b
27 changed files with 87 additions and 90 deletions

View file

@ -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])