@nuskin/ns-shop 6.0.1 → 6.0.2
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 +1 -1
- package/src/salesEventService.js +9 -13
package/package.json
CHANGED
package/src/salesEventService.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import $ from '@nuskin/nuskinjquery';
|
|
2
|
-
import {RunConfigService, UrlService, events, storage
|
|
2
|
+
import {RunConfigService, UrlService, events, storage} from '@nuskin/ns-util';
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import { UserService } from '@nuskin/ns-account';
|
|
5
5
|
|
|
@@ -1087,13 +1087,7 @@ async function _init(force = true) {
|
|
|
1087
1087
|
// init is passed arguments when initiated by $(document).ready(init) below. Need
|
|
1088
1088
|
// to check for actual boolean true for initialization.
|
|
1089
1089
|
if (await _initData(force === true)) {
|
|
1090
|
-
|
|
1091
|
-
events.subscribe(events.global.CONFIGURATION_SET, () => {
|
|
1092
|
-
initActiveEvents().catch((err) => {console.error('Error initializing event tickets.', err)});
|
|
1093
|
-
});
|
|
1094
|
-
} else {
|
|
1095
|
-
initActiveEvents().catch((err) => {console.error('Error initializing event tickets.', err)});
|
|
1096
|
-
}
|
|
1090
|
+
initActiveEvents().catch((err) => {console.error('Error initializing event tickets.', err)});
|
|
1097
1091
|
} else {
|
|
1098
1092
|
_removeWaitCheck(INITIALIZING);
|
|
1099
1093
|
}
|
|
@@ -1114,9 +1108,11 @@ events.subscribe(events.salesevent.ACTIVE_EVENTS, (/*activeEvents*/) => {
|
|
|
1114
1108
|
});
|
|
1115
1109
|
|
|
1116
1110
|
/**
|
|
1117
|
-
* Waits for
|
|
1118
|
-
*
|
|
1111
|
+
* Waits for config to be loaded and then initializes tickets
|
|
1112
|
+
* for events associated to the current market.
|
|
1119
1113
|
*/
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1114
|
+
events.getValue(events.global.CS_CONFIG_SET, async (configs) => {
|
|
1115
|
+
if (configs != null) {
|
|
1116
|
+
await _init(false);
|
|
1117
|
+
}
|
|
1118
|
+
})
|