abmp-npm 10.0.65 → 10.0.66

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": "10.0.65",
3
+ "version": "10.0.66",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "check-cycles": "madge --circular .",
@@ -1,7 +1,6 @@
1
1
  const { location: wixLocation } = require('@wix/site-location');
2
2
  const { window: wixWindow } = require('@wix/site-window');
3
3
 
4
- const { getPublicMemberProfileData } = require('../backend');
5
4
  const { LIGHTBOX_NAMES } = require('../public/consts');
6
5
  const {
7
6
  generateId,
@@ -30,13 +29,19 @@ const resolveMemberDataId = memberData => {
30
29
  return memberData?._id || memberData?._ref || null;
31
30
  };
32
31
 
33
- async function publicProfileOnReady({ $w: _$w }) {
32
+ async function publicProfileOnReady({ $w: _$w, getPublicMemberProfileData }) {
34
33
  const dataset = _$w('#dynamicDataset');
35
34
  let profileData = null;
36
35
 
37
36
  let testimonialsPerPage = TESTIMONIALS_PER_PAGE_CONFIG.TABLET;
38
37
  let currentTestimonialPage = 0;
39
38
 
39
+ if (typeof getPublicMemberProfileData !== 'function') {
40
+ console.error('[publicProfileOnReady] getPublicMemberProfileData is required');
41
+ wixLocation.to(`${wixLocation.baseUrl}/404`);
42
+ return;
43
+ }
44
+
40
45
  await dataset.onReadyAsync();
41
46
  const item = dataset.getCurrentItem();
42
47
  if (!item || item.showWixUrl !== true) {