@miso.ai/client-sdk-core 1.8.1-beta.5 → 1.8.1-beta.6
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/dist/cjs/api/helpers.js +2 -1
- package/dist/cjs/version.js +1 -1
- package/package.json +2 -2
- package/src/api/helpers.js +4 -1
- package/src/version.js +1 -1
package/dist/cjs/api/helpers.js
CHANGED
|
@@ -114,7 +114,8 @@ class ApiHelpers {
|
|
|
114
114
|
if (method && method !== 'POST') {
|
|
115
115
|
throw new Error(`Non-POST API is not supported in useBeacon mode: ${url}`);
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
const successful = this._root._customSendBeacon ? this._root._customSendBeacon(url, JSON.stringify(payload)) : window.navigator.sendBeacon(url, JSON.stringify(payload));
|
|
118
|
+
if (!successful) {
|
|
118
119
|
throw new Error(`Send beacon unsuccessful: ${url}`);
|
|
119
120
|
}
|
|
120
121
|
}
|
package/dist/cjs/version.js
CHANGED
package/package.json
CHANGED
package/src/api/helpers.js
CHANGED
|
@@ -83,7 +83,10 @@ export default class ApiHelpers {
|
|
|
83
83
|
if (method && method !== 'POST') {
|
|
84
84
|
throw new Error(`Non-POST API is not supported in useBeacon mode: ${url}`);
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
const successful = this._root._customSendBeacon ?
|
|
87
|
+
this._root._customSendBeacon(url, JSON.stringify(payload)) :
|
|
88
|
+
window.navigator.sendBeacon(url, JSON.stringify(payload));
|
|
89
|
+
if (!successful) {
|
|
87
90
|
throw new Error(`Send beacon unsuccessful: ${url}`);
|
|
88
91
|
}
|
|
89
92
|
}
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.8.1-beta.
|
|
1
|
+
export default '1.8.1-beta.6';
|