This undefined check no longer makes sense since there are now
defaults for these in register(). There is no supported scenario
in which a module would have a key in the registry but not
have these properties defined, or have them defined with
the undefined value.
Change-Id: I945871861ccf3659c2d7dd021aa87dfd747f22b9
* in the registry.
*/
getVersion: function ( module ) {
- if ( !hasOwn.call( registry, module ) || registry[ module ].version === undefined ) {
- return null;
- }
- return registry[ module ].version;
+ return hasOwn.call( registry, module ) ? registry[ module ].version : null;
},
/**
* in the registry.
*/
getState: function ( module ) {
- if ( !hasOwn.call( registry, module ) || registry[ module ].state === undefined ) {
- return null;
- }
- return registry[ module ].state;
+ return hasOwn.call( registry, module ) ? registry[ module ].state : null;
},
/**