Skip to content

Commit

Permalink
fix(adapter.requirejs): show error if no timestamp defined for a file
Browse files Browse the repository at this point in the history
And do not append the timestamp at all, maybe it's being loaded from a proxy.
  • Loading branch information
vojtajina committed Feb 2, 2013
1 parent 36e87d8 commit 59dbdbd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion adapter/require.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 59dbdbd

Please sign in to comment.