From 59dbdbd136baa87467b9b9a4cb6ce226ae87bbef Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Sat, 2 Feb 2013 14:03:37 -0800 Subject: [PATCH] fix(adapter.requirejs): show error if no timestamp defined for a file And do not append the timestamp at all, maybe it's being loaded from a proxy. --- adapter/require.src.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/adapter/require.src.js b/adapter/require.src.js index ce2c65bdb..96902bbe1 100644 --- a/adapter/require.src.js +++ b/adapter/require.src.js @@ -4,7 +4,13 @@ var load_original = window.requirejs.load; requirejs.load = function (context, moduleName, url) { - return load_original.call(this, context, moduleName, url + '?' + __testacular__.files[url]); + if (__testacular__.files.hasOwnProperty(url)) { + url = url + '?' + __testacular__.files[url]; + } else { + console.error('There is no timestamp for ' + url + '!'); + } + + return load_original.call(this, context, moduleName, url); }; require.config({