1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-03-01 02:41:25 +00:00

Fixed bug in promise, where you couldn't resolve a promise with null

This commit is contained in:
Bryan Roe
2020-05-29 12:27:06 -07:00
parent 7d56f621e7
commit f221412c34
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -133,7 +133,7 @@ function Promise(promiseFunc)
args.push(arguments[a]);
}
}
if (args.length == 2 && args[1]._ObjectID == 'promise')
if (args.length == 2 && args[1]!=null && typeof(args[1]) == 'object' && args[1]._ObjectID == 'promise')
{
var pr = getRootPromise(_resolver._self.promise);
pr._internal._haltUncaught = true;