abmp-npm 1.8.8 → 1.8.10

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": "abmp-npm",
3
- "version": "1.8.8",
3
+ "version": "1.8.10",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -1,7 +1,6 @@
1
- const { location } = require('@wix/site-location');
2
- const wixLocation = location();
3
- const { storage: wixStorage } = require('@wix/site-storage');
4
- const { window: wixWindow } = require('@wix/site-window');
1
+ const { location: wixLocationModule } = require('@wix/site-location');
2
+ const { storage: wixStorageModule } = require('@wix/site-storage');
3
+ const { window: wixWindowModule } = require('@wix/site-window');
5
4
  const _ = require('lodash');
6
5
 
7
6
  const {
@@ -63,7 +62,12 @@ async function personalDetailsFormOnReady({
63
62
  saveRegistrationData,
64
63
  validateMemberToken,
65
64
  checkUrlUniqueness,
65
+ query = {}, // Query params passed from host page
66
66
  }) {
67
+ // Initialize Wix SDK modules
68
+ const wixStorage = wixStorageModule();
69
+ const wixWindow = wixWindowModule();
70
+
67
71
  let itemMemberObj = {};
68
72
  let originalMemberData = {};
69
73
  let selectedServices = [];
@@ -103,8 +107,7 @@ async function personalDetailsFormOnReady({
103
107
  };
104
108
 
105
109
  // Main initialization
106
- const query = wixLocation.query || {};
107
- console.log('wixLocation.query', query);
110
+ console.log('query', query);
108
111
  const memberTokenId = query.token;
109
112
  console.log('memberTokenId', memberTokenId);
110
113
  if (!memberTokenId) {