guard against calling an undefined function

pull/1/head
ansuz 6 years ago
parent 20959f84ae
commit 6f89156415

@ -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) {

Loading…
Cancel
Save