chore(xen-api): more explicit tests

This commit is contained in:
Julien Fontanet 2018-03-28 11:43:15 +02:00
parent c1c17fad44
commit 52e845834e

View File

@ -448,7 +448,7 @@ export class Xapi extends EventEmitter {
const object = const object =
this._objects.all[idOrUuidOrRef] || this._objectsByRefs[idOrUuidOrRef] this._objects.all[idOrUuidOrRef] || this._objectsByRefs[idOrUuidOrRef]
if (object) return object if (object !== undefined) return object
if (arguments.length > 1) return defaultValue if (arguments.length > 1) return defaultValue
@ -460,7 +460,7 @@ export class Xapi extends EventEmitter {
getObjectByRef (ref, defaultValue) { getObjectByRef (ref, defaultValue) {
const object = this._objectsByRefs[ref] const object = this._objectsByRefs[ref]
if (object) return object if (object !== undefined) return object
if (arguments.length > 1) return defaultValue if (arguments.length > 1) return defaultValue