diff --git a/lib/modules/core/app.js b/lib/modules/core/app.js index 95a8a499eb..c77ed4b66a 100644 --- a/lib/modules/core/app.js +++ b/lib/modules/core/app.js @@ -116,10 +116,12 @@ export default class App { * @param props */ extendApp(props: Object) { - if (!isObject(props)) + if (!isObject(props)) { throw new Error( INTERNALS.STRINGS.ERROR_MISSING_ARG('Object', 'extendApp') ); + } + const keys = Object.keys(props); for (let i = 0, len = keys.length; i < len; i++) { @@ -167,4 +169,13 @@ export default class App { }); }); } + + /** + * toString returns the name of the app. + * + * @return {string} + */ + toString() { + return this._name; + } } diff --git a/lib/utils/apps.js b/lib/utils/apps.js index cc06173641..ac6f84c9dd 100644 --- a/lib/utils/apps.js +++ b/lib/utils/apps.js @@ -38,7 +38,8 @@ export default { /** * - * @param statics + * @param app + * @param namespace * @param InstanceClass * @return {function()} * @private @@ -152,8 +153,9 @@ export default { /** * + * @param namespace * @param statics - * @param InstanceClass + * @param moduleName * @return {function(App=)} */ moduleAndStatics(