mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-29 00:00:33 -04: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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue