Skip to content

Commit 4d505b9

Browse files
Generate latest bundle
1 parent 308b848 commit 4d505b9

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

build/mParticle.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var v1ServiceUrl = 'jssdk.mparticle.com/v1/JS/',
44
v2ServiceUrl = 'jssdk.mparticle.com/v2/JS/',
55
v2SecureServiceUrl = 'jssdks.mparticle.com/v2/JS/',
66
identityUrl = 'https://identity.mparticle.com/v1/', //prod
7-
sdkVersion = '2.2.2',
7+
sdkVersion = '2.2.3',
88
sdkVendor = 'mparticle',
99
platform = 'web',
1010
Messages = {
@@ -1536,9 +1536,6 @@ function inArray(items, name) {
15361536
}
15371537

15381538
function tryNativeSdk(path, value) {
1539-
if (!mParticle.useNativeSdk) {
1540-
return false;
1541-
}
15421539
if (window.mParticleAndroid && window.mParticleAndroid.hasOwnProperty(path)) {
15431540
logDebug(Messages.InformationMessages.SendAndroid + path);
15441541
window.mParticleAndroid[path](value);
@@ -1556,18 +1553,15 @@ function tryNativeSdk(path, value) {
15561553
return true;
15571554
}
15581555

1559-
return false;
1556+
return mParticle.useNativeSdk;
15601557
}
15611558

15621559
function createServiceUrl(secureServiceUrl, serviceUrl, devToken) {
15631560
return serviceScheme + ((window.location.protocol === 'https:') ? secureServiceUrl : serviceUrl) + devToken;
15641561
}
15651562

15661563
function isWebViewEmbedded() {
1567-
if (!mParticle.useNativeSdk) {
1568-
return false;
1569-
}
1570-
if (window.mParticleAndroid
1564+
if (mParticle.useNativeSdk || window.mParticleAndroid
15711565
|| window.mParticle.isIOS) {
15721566
return true;
15731567
}
@@ -2808,8 +2802,8 @@ var Polyfill = require('./polyfill'),
28082802
*/
28092803

28102804
var mParticle = {
2811-
useNativeSdk: true,
2812-
isIOS: false,
2805+
useNativeSdk: window.mParticle && window.mParticle.useNativeSdk ? window.mParticle.useNativeSdk : false,
2806+
isIOS: window.mParticle && window.mParticle.isIOS ? window.mParticle.isIOS : false,
28132807
isDevelopmentMode: false,
28142808
useCookieStorage: false,
28152809
maxProducts: Constants.DefaultConfig.MaxProducts,

mparticle.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var v1ServiceUrl = 'jssdk.mparticle.com/v1/JS/',
44
v2ServiceUrl = 'jssdk.mparticle.com/v2/JS/',
55
v2SecureServiceUrl = 'jssdks.mparticle.com/v2/JS/',
66
identityUrl = 'https://identity.mparticle.com/v1/', //prod
7-
sdkVersion = '2.2.2',
7+
sdkVersion = '2.2.3',
88
sdkVendor = 'mparticle',
99
platform = 'web',
1010
Messages = {
@@ -1536,9 +1536,6 @@ function inArray(items, name) {
15361536
}
15371537

15381538
function tryNativeSdk(path, value) {
1539-
if (!mParticle.useNativeSdk) {
1540-
return false;
1541-
}
15421539
if (window.mParticleAndroid && window.mParticleAndroid.hasOwnProperty(path)) {
15431540
logDebug(Messages.InformationMessages.SendAndroid + path);
15441541
window.mParticleAndroid[path](value);
@@ -1556,18 +1553,15 @@ function tryNativeSdk(path, value) {
15561553
return true;
15571554
}
15581555

1559-
return false;
1556+
return mParticle.useNativeSdk;
15601557
}
15611558

15621559
function createServiceUrl(secureServiceUrl, serviceUrl, devToken) {
15631560
return serviceScheme + ((window.location.protocol === 'https:') ? secureServiceUrl : serviceUrl) + devToken;
15641561
}
15651562

15661563
function isWebViewEmbedded() {
1567-
if (!mParticle.useNativeSdk) {
1568-
return false;
1569-
}
1570-
if (window.mParticleAndroid
1564+
if (mParticle.useNativeSdk || window.mParticleAndroid
15711565
|| window.mParticle.isIOS) {
15721566
return true;
15731567
}
@@ -2808,8 +2802,8 @@ var Polyfill = require('./polyfill'),
28082802
*/
28092803

28102804
var mParticle = {
2811-
useNativeSdk: true,
2812-
isIOS: false,
2805+
useNativeSdk: window.mParticle && window.mParticle.useNativeSdk ? window.mParticle.useNativeSdk : false,
2806+
isIOS: window.mParticle && window.mParticle.isIOS ? window.mParticle.isIOS : false,
28132807
isDevelopmentMode: false,
28142808
useCookieStorage: false,
28152809
maxProducts: Constants.DefaultConfig.MaxProducts,

0 commit comments

Comments
 (0)