guard against calling an undefined function
This commit is contained in:
1 parent
060e5a12a2
commit
8bab799ac9
1 file changed
+1
@@ -22,6 +22,7 @@ define([
|
|||||||
http.send();
|
http.send();
|
||||||
};
|
};
|
||||||
Feedback.send = function (action, force, cb) {
|
Feedback.send = function (action, force, cb) {
|
||||||
|
if (typeof(cb) !== 'function') { cb = function () {}; }
|
||||||
if (AppConfig.disableFeedback) { return void cb(); }
|
if (AppConfig.disableFeedback) { return void cb(); }
|
||||||
if (!action) { return void cb(); }
|
if (!action) { return void cb(); }
|
||||||
if (force !== true) {
|
if (force !== true) {
|
||||||
|
|||||||
Reference in new issue
Block a user