@deflectbot/deflect-sdk 1.1.13 → 1.1.14
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.js +8 -1
- package/package.json +1 -1
- package/src/index.ts +8 -1
package/dist/index.js
CHANGED
|
@@ -92,7 +92,14 @@ class Deflect {
|
|
|
92
92
|
typeof window.Deflect.getToken !== "function") {
|
|
93
93
|
throw new Error("Deflect script did not load properly");
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
let token;
|
|
96
|
+
try {
|
|
97
|
+
token = yield window.Deflect.getToken();
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error("Error during Deflect script execution:", error);
|
|
101
|
+
throw new Error("Deflect script execution failed");
|
|
102
|
+
}
|
|
96
103
|
URL.revokeObjectURL(blobUrl);
|
|
97
104
|
scriptEl.remove();
|
|
98
105
|
delete window.Deflect.getToken;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -105,7 +105,14 @@ class Deflect {
|
|
|
105
105
|
throw new Error("Deflect script did not load properly");
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
let token: string;
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
token = await window.Deflect.getToken();
|
|
112
|
+
} catch (error) {
|
|
113
|
+
console.error("Error during Deflect script execution:", error);
|
|
114
|
+
throw new Error("Deflect script execution failed");
|
|
115
|
+
}
|
|
109
116
|
|
|
110
117
|
URL.revokeObjectURL(blobUrl);
|
|
111
118
|
scriptEl.remove();
|