Added checks for undefined
This commit is contained in:
parent
fc107f1552
commit
d12b0789aa
|
@ -135,7 +135,7 @@ module.exports = class Address {
|
|||
static fromString(addrStr) {
|
||||
const m = FTN_ADDRESS_REGEXP.exec(addrStr);
|
||||
|
||||
if (m) {
|
||||
if (m && m[2] && m[3]) {
|
||||
// start with a 2D
|
||||
let addr = {
|
||||
net: parseInt(m[2]),
|
||||
|
|
|
@ -91,7 +91,7 @@ function validateGeneralMailAddressedTo(data, cb) {
|
|||
// :TODO: remove hard-coded FTN check here. We need a decent way to register global supported flavors with modules.
|
||||
const addressedToInfo = getAddressedToInfo(data);
|
||||
|
||||
if (Message.AddressFlavor.FTN === addressedToInfo.flavor) {
|
||||
if (Message.AddressFlavor.Local !== addressedToInfo.flavor) {
|
||||
return cb(null);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue