|
|
|
@ -162,7 +162,7 @@ Pinning.pinChannel = function (Env, safeKey, channels, cb) {
|
|
|
|
|
|
|
|
|
|
// only pin channels which are not already pinned
|
|
|
|
|
var toStore = channels.filter(function (channel) {
|
|
|
|
|
return pinned.indexOf(channel) === -1;
|
|
|
|
|
return channel && pinned.indexOf(channel) === -1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (toStore.length === 0) {
|
|
|
|
@ -204,7 +204,7 @@ Pinning.unpinChannel = function (Env, safeKey, channels, cb) {
|
|
|
|
|
|
|
|
|
|
// only unpin channels which are pinned
|
|
|
|
|
var toStore = channels.filter(function (channel) {
|
|
|
|
|
return pinned.indexOf(channel) !== -1;
|
|
|
|
|
return channel && pinned.indexOf(channel) !== -1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (toStore.length === 0) {
|
|
|
|
|