fix(chromium): Add error message to asset when there is one. (#15892)

[196] -- Provide the assert function with with either the error message in the provided object or undefined if there isn't one
This commit is contained in:
Making Stuffs 2022-07-28 23:45:25 +02:00 committed by GitHub
parent 829a1b8444
commit 6f47f0f22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ export class CRSession extends EventEmitter {
} else if (object.id && object.error?.code === -32001) { } else if (object.id && object.error?.code === -32001) {
// Message to a closed session, just ignore it. // Message to a closed session, just ignore it.
} else { } else {
assert(!object.id); assert(!object.id, object?.error?.message || undefined);
Promise.resolve().then(() => { Promise.resolve().then(() => {
if (this._eventListener) if (this._eventListener)
this._eventListener(object.method!, object.params); this._eventListener(object.method!, object.params);