mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
better exception when discourse.ajax is called, still need to figure out how to fix it though :)
This commit is contained in:
parent
a65407b2cb
commit
e57967c6c3
@ -83,7 +83,11 @@ window.assetPath = function() { return null; };
|
||||
|
||||
var oldAjax = $.ajax;
|
||||
$.ajax = function() {
|
||||
console.error("Discourse.Ajax called in test environment (" + arguments[0] + ")");
|
||||
try {
|
||||
this.undef();
|
||||
} catch(e) {
|
||||
console.error("Discourse.Ajax called in test environment (" + arguments[0] + ")\n caller: " + e.stack.split("\n").slice(2).join("\n"));
|
||||
}
|
||||
return oldAjax.apply(this, arguments);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user