hypha-debugger 0.1.8 → 0.1.9
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/hypha-debugger.mjs
CHANGED
|
@@ -5621,6 +5621,13 @@ class HyphaDebugger {
|
|
|
5621
5621
|
this.cursor = new AICursor();
|
|
5622
5622
|
}
|
|
5623
5623
|
try {
|
|
5624
|
+
// Polyfill Promise.prototype.finally if missing (needed by hypha-rpc
|
|
5625
|
+
// in some older environments / polyfilled Promise implementations)
|
|
5626
|
+
if (typeof Promise.prototype.finally !== "function") {
|
|
5627
|
+
Promise.prototype.finally = function (cb) {
|
|
5628
|
+
return this.then((value) => Promise.resolve(cb()).then(() => value), (reason) => Promise.resolve(cb()).then(() => { throw reason; }));
|
|
5629
|
+
};
|
|
5630
|
+
}
|
|
5624
5631
|
// Get the connectToServer function
|
|
5625
5632
|
const connect = this.getConnectToServer();
|
|
5626
5633
|
// Connect to Hypha server
|