Skip to content

Commit be956f9

Browse files
committed
chore: move nonCurrentUserMPIDs update block
1 parent d76d315 commit be956f9

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/persistence.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,6 @@ export default function _Persistence(mpInstance) {
8989
self.storeDataInMemory(cookies);
9090
}
9191

92-
// https://go.mparticle.com/work/SQDSDKS-6046
93-
// Stores all non-current user MPID information into the store
94-
for (var key in allData) {
95-
if (allData.hasOwnProperty(key)) {
96-
if (!SDKv2NonMPIDCookieKeys[key]) {
97-
mpInstance._Store.nonCurrentUserMPIDs[key] =
98-
allData[key];
99-
}
100-
}
101-
}
102-
10392
// https://go.mparticle.com/work/SQDSDKS-6048
10493
try {
10594
if (mpInstance._Store.isLocalStorageAvailable) {
@@ -128,6 +117,17 @@ export default function _Persistence(mpInstance) {
128117
'Error loading products in initialization: ' + e
129118
);
130119
}
120+
121+
// https://go.mparticle.com/work/SQDSDKS-6046
122+
// Stores all non-current user MPID information into the store
123+
for (var key in allData) {
124+
if (allData.hasOwnProperty(key)) {
125+
if (!SDKv2NonMPIDCookieKeys[key]) {
126+
mpInstance._Store.nonCurrentUserMPIDs[key] =
127+
allData[key];
128+
}
129+
}
130+
}
131131
self.update();
132132
} catch (e) {
133133
// If cookies or local storage is corrupt, we want to remove it

0 commit comments

Comments
 (0)