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:
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user