Fix type error

This commit is contained in:
yflory 2020-12-23 12:00:17 +01:00
parent 2dc7438cba
commit 588955c1fe

View file

@ -587,8 +587,8 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto, Feedback)
// deleted while you are open
// emit an event
var onChannelError = function (info) {
Feedback.send('ROSTER_CHANNEL_ERROR='+info.type);
if (info.type === "EUNKNOWN") {
if (Feedback) { Feedback.send('ROSTER_CHANNEL_ERROR='+(info && info.type)); }
if (info && info.type === "EUNKNOWN") {
// chainpad-netflux should recover by itself
return;
}