console can be defined higher up
This commit is contained in:
parent
d38af7ed89
commit
dbf20052c3
11
converse.js
11
converse.js
@ -11,8 +11,10 @@
|
|||||||
|
|
||||||
// AMD/global registrations
|
// AMD/global registrations
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
|
if (console===undefined || console.log===undefined) {
|
||||||
|
console = { log: function () {}, error: function () {} };
|
||||||
|
}
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
|
||||||
require.config({
|
require.config({
|
||||||
// paths: {
|
// paths: {
|
||||||
// "patterns": "Libraries/Patterns"
|
// "patterns": "Libraries/Patterns"
|
||||||
@ -58,10 +60,6 @@
|
|||||||
evaluate : /\{\[([\s\S]+?)\]\}/g,
|
evaluate : /\{\[([\s\S]+?)\]\}/g,
|
||||||
interpolate : /\{\{([\s\S]+?)\}\}/g
|
interpolate : /\{\{([\s\S]+?)\}\}/g
|
||||||
};
|
};
|
||||||
|
|
||||||
if (console===undefined || console.log===undefined) {
|
|
||||||
console = { log: function () {}, error: function () {} };
|
|
||||||
}
|
|
||||||
return factory(jQuery, store, _, console);
|
return factory(jQuery, store, _, console);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -72,9 +70,6 @@
|
|||||||
evaluate : /\{\[([\s\S]+?)\]\}/g,
|
evaluate : /\{\[([\s\S]+?)\]\}/g,
|
||||||
interpolate : /\{\{([\s\S]+?)\}\}/g
|
interpolate : /\{\{([\s\S]+?)\}\}/g
|
||||||
};
|
};
|
||||||
if (console===undefined || console.log===undefined) {
|
|
||||||
console = { log: function () {}, error: function () {} };
|
|
||||||
}
|
|
||||||
root.xmppchat = factory(jQuery, store, _, console || {log: function(){}});
|
root.xmppchat = factory(jQuery, store, _, console || {log: function(){}});
|
||||||
}
|
}
|
||||||
}(this, function ($, store, _, console) {
|
}(this, function ($, store, _, console) {
|
||||||
|
Loading…
Reference in New Issue
Block a user