Fix Path error

This commit is contained in:
emad-salah 2019-12-04 16:21:53 +01:00
parent 65810841b2
commit 709c99536a

View file

@ -77,7 +77,7 @@ module.exports = (
// with the GunDB service. // with the GunDB service.
Mediator.createMediator(socket); Mediator.createMediator(socket);
const macaroonExists = await FS.access(lnServicesData.macaroonPath); const macaroonExists = await (lnServicesData.macaroonPath ? FS.access(lnServicesData.macaroonPath) : false);
const lnServices = await require("../services/lnd/lightning")( const lnServices = await require("../services/lnd/lightning")(
lnServicesData.lndProto, lnServicesData.lndProto,
lnServicesData.lndHost, lnServicesData.lndHost,
@ -88,7 +88,7 @@ module.exports = (
lightning = lnServices.lightning; lightning = lnServices.lightning;
mySocketsEvents.addListener("updateLightning", async () => { mySocketsEvents.addListener("updateLightning", async () => {
const newMacaroonExists = await FS.access(lnServicesData.macaroonPath); const newMacaroonExists = await (lnServicesData.macaroonPath ? FS.access(lnServicesData.macaroonPath) : false);
const newLNServices = await require("../services/lnd/lightning")( const newLNServices = await require("../services/lnd/lightning")(
lnServicesData.lndProto, lnServicesData.lndProto,
lnServicesData.lndHost, lnServicesData.lndHost,