@ubaidbinwaris/linkedin-login 2.1.0 → 2.1.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubaidbinwaris/linkedin-login",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -86,10 +86,11 @@ async function loginToLinkedIn(options = {}, credentials = null) {
86
86
  }
87
87
  } else {
88
88
  // Failed mobile verification.
89
- // User Request: "otherwise after some delay using browser opens the browser and fill the form"
90
-
91
- if (options.headless) {
92
- logger.info("[Fallback] Mobile verification failed. Switching to VISIBLE browser for manual intervention...");
89
+ // User Request: "otherwise after some delay using browser opens the browser and fill the form"
90
+
91
+ // If headless AND fallback is NOT disabled
92
+ if (options.headless && !options.disableFallback) {
93
+ logger.info("[Fallback] Mobile verification failed. Switching to VISIBLE browser for manual intervention...");
93
94
  await browser.close();
94
95
 
95
96
  // RE-LAUNCH in Visible Mode