From 2b1ef422ca0ca6819d07181ae32a9d76a2e75193 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 18 May 2013 18:52:11 +0200 Subject: [PATCH] Tiny $.cache fix. --- lib/$.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/$.coffee b/lib/$.coffee index 53a6a7dce..ef83364c3 100644 --- a/lib/$.coffee +++ b/lib/$.coffee @@ -54,7 +54,7 @@ $.cache = do -> (url, cb) -> if req = reqs[url] if req.readyState is 4 - cb.call req + cb.call req, req.evt else req.callbacks.push cb return @@ -62,6 +62,7 @@ $.cache = do -> req = $.ajax url, onload: (e) -> cb.call @, e for cb in @callbacks + req.evt = e delete @callbacks onabort: rm onerror: rm