Guard against null/undefined error.res.

This commit is contained in:
Julien Fontanet 2016-01-05 16:09:06 +01:00
parent b2a51bd658
commit 3485cb4ec4

View File

@ -578,7 +578,7 @@ export class Xapi extends EventEmitter {
// If the server failed, it is probably due to an excessively
// large response.
// Falling back to legacy events watch should be enough.
error && error.res.statusCode === 500
error && error.res && error.res.statusCode === 500
) {
return this._watchEventsLegacy()
}