gologin 2.1.6 → 2.1.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/gologin.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gologin",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "A high-level API to control Orbita browser over GoLogin API",
5
5
  "types": "./index.d.ts",
6
6
  "main": "./src/gologin.js",
package/src/gologin.js CHANGED
@@ -1353,6 +1353,10 @@ export class GoLogin {
1353
1353
  cookies = await this.getCookies(this.profile_id);
1354
1354
  }
1355
1355
 
1356
+ if (!cookies?.length) {
1357
+ return;
1358
+ }
1359
+
1356
1360
  const resultCookies = cookies.map((el) => ({ ...el, value: Buffer.from(el.value) }));
1357
1361
  let db;
1358
1362
  const profilePath = join(this.tmpdir, `gologin_profile_${this.profile_id}`);