1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-24 04:04:31 +00:00

1. Fixed bug with uncaught rejections in promise.js

2. Updated DHCP.info to support mac address entry
3. Updated clipboard to be able to force single line entry for addModule
This commit is contained in:
Bryan Roe
2021-07-23 16:04:54 -07:00
parent ad961128a2
commit a41983ee7a
4 changed files with 49 additions and 11 deletions

View File

@@ -116,17 +116,20 @@ function Promise(promiseFunc)
//if (eventName == 'rejected' && (eventCallback.internal == null || eventCallback.internal == false))
if (eventName == 'rejected')
{
var rp = getRootPromise(this.promise);
rp._internal.external = true;
if (this.uncaught != null)
{
clearImmediate(this.uncaught);
this.uncaught = null;
}
if (rp._internal.uncaught != null)
if (this.promise)
{
clearImmediate(rp._internal.uncaught);
rp._internal.uncaught = null;
var rp = getRootPromise(this.promise);
rp._internal.external = true;
if (rp._internal.uncaught != null)
{
clearImmediate(rp._internal.uncaught);
rp._internal.uncaught = null;
}
}
}
@@ -293,6 +296,19 @@ function Promise(promiseFunc)
this._internal.once('settled', (function ()
{
if (this.uncaught != null)
{
clearImmediate(this.uncaught);
this.uncaught = null;
}
var rp = getRootPromise(this.promise);
if (rp && rp._internal.uncaught)
{
clearImmediate(rp._internal.uncaught);
rp._internal.uncaught = null;
}
delete this.promise._up;
delete this.promise.__childPromise;
delete this.promise.promise;