@spacinbox/sdk 2.1.0 → 2.2.0
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/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/widget.global.js +4 -3
- package/dist/widget.global.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1467,16 +1467,17 @@ async function mountWidget(options) {
|
|
|
1467
1467
|
var controller = null;
|
|
1468
1468
|
var bootPromise = null;
|
|
1469
1469
|
var Spacinbox = {
|
|
1470
|
-
boot(options) {
|
|
1470
|
+
async boot(options) {
|
|
1471
1471
|
if (typeof document === "undefined") {
|
|
1472
|
-
return Promise.resolve();
|
|
1472
|
+
return Promise.resolve({ success: false });
|
|
1473
1473
|
}
|
|
1474
1474
|
if (bootPromise) {
|
|
1475
1475
|
return bootPromise;
|
|
1476
1476
|
}
|
|
1477
1477
|
bootPromise = mountWidget(options).then((instance) => {
|
|
1478
1478
|
controller = instance;
|
|
1479
|
-
|
|
1479
|
+
return { success: true };
|
|
1480
|
+
}).catch(() => ({ success: false }));
|
|
1480
1481
|
return bootPromise;
|
|
1481
1482
|
},
|
|
1482
1483
|
async identify(user) {
|