abmp-npm 1.8.7 → 1.8.9

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