@infosoftas/s4-orders-js-sdk 0.1.1 → 0.1.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
CHANGED
|
@@ -100,7 +100,10 @@ const OrderForm: FC<Props> = ({
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
if (!subscriberId) {
|
|
103
|
-
|
|
103
|
+
const sessionSubscriberId = sessionStorage.getItem('subscriberId');
|
|
104
|
+
if (sessionSubscriberId) {
|
|
105
|
+
subscriberId = sessionSubscriberId;
|
|
106
|
+
}
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
if (!userId) {
|
|
@@ -109,6 +109,8 @@ const useOrderForm = ({
|
|
|
109
109
|
});
|
|
110
110
|
id = response.id;
|
|
111
111
|
|
|
112
|
+
sessionStorage.setItem('subscriberId', id); // For avoiding attempt of creating subscriber again
|
|
113
|
+
|
|
112
114
|
if (userId && identityProviderId) {
|
|
113
115
|
await mapSubscriberToUser(id, {
|
|
114
116
|
userId: userId,
|