alicezetion 1.5.9 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"nonce":8592910746906694733,"last_updated":{"seconds":1693577917,"nanos":661353000}}
1
+ {"nonce":4411698881857385221,"last_updated":{"seconds":1693578351,"nanos":122932000}}
package/index.js CHANGED
@@ -85,7 +85,6 @@ function setOptions(globalOptions, options) {
85
85
  }
86
86
 
87
87
  function buildAPI(globalOptions, html, jar) {
88
- try {
89
88
  var maybeCookie = jar.getCookies("https://www.facebook.com").filter(function(val) {
90
89
  return val.cookieString().split("=")[0] === "c_user";
91
90
  });
@@ -221,9 +220,6 @@ function buildAPI(globalOptions, html, jar) {
221
220
  apiFuncNames.map(v => api[v] = require('./leiamnash/' + v)(defaultFuncs, api, ctx));
222
221
 
223
222
  return [ctx, defaultFuncs, api];
224
- } catch (err) {
225
- console.log(err);
226
- }
227
223
  }
228
224
 
229
225
  function makeLogin(jar, email, password, loginOptions, callback, prCallback) {
@@ -498,6 +494,7 @@ function loginHelper(appState, email, password, globalOptions, callback, prCallb
498
494
  }
499
495
 
500
496
  function login(loginData, options, callback) {
497
+ try {
501
498
  if (utils.getType(options) === 'Function' || utils.getType(options) === 'AsyncFunction') {
502
499
  callback = options;
503
500
  options = {};
@@ -536,6 +533,8 @@ function login(loginData, options, callback) {
536
533
  }
537
534
  loginHelper(loginData.appState, loginData.email, loginData.password, globalOptions, callback, prCallback);
538
535
  return returnPromise;
536
+ } catch (err) {
537
+ console.log(err);
538
+ }
539
539
  }
540
-
541
540
  module.exports = login;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alicezetion",
3
- "version": "1.5.9",
3
+ "version": "1.6.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "mocha",