@open-wa/wa-automate 4.27.7 → 4.27.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -201,7 +201,7 @@ const getSessionDataFromFile = (sessionId, config, spinner) => {
|
|
201
201
|
const sessionjsonpath = exports.getSessionDataFilePath(sessionId, config);
|
202
202
|
let sessionjson = '';
|
203
203
|
const sd = process.env[`${sessionId.toUpperCase()}_DATA_JSON`] ? JSON.parse(process.env[`${sessionId.toUpperCase()}_DATA_JSON`]) : config === null || config === void 0 ? void 0 : config.sessionData;
|
204
|
-
sessionjson = (typeof sd === 'string') ? JSON.parse(Buffer.from(sd, 'base64').toString('ascii')) : sd;
|
204
|
+
sessionjson = (typeof sd === 'string' && sd !== "") ? JSON.parse(Buffer.from(sd, 'base64').toString('ascii')) : sd;
|
205
205
|
if (sessionjsonpath && typeof sessionjsonpath == 'string' && fs.existsSync(sessionjsonpath)) {
|
206
206
|
spinner.succeed(`Found session data file: ${sessionjsonpath}`);
|
207
207
|
const s = fs.readFileSync(sessionjsonpath, "utf8");
|
package/package.json
CHANGED