Skip to content

Commit

Permalink
fix #848
Browse files Browse the repository at this point in the history
  • Loading branch information
Salakar committed Feb 24, 2018
1 parent 6f5eda4 commit e73812a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 12 additions & 1 deletion lib/modules/core/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down Expand Up @@ -167,4 +169,13 @@ export default class App {
});
});
}

/**
* toString returns the name of the app.
*
* @return {string}
*/
toString() {
return this._name;
}
}
6 changes: 4 additions & 2 deletions lib/utils/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export default {

/**
*
* @param statics
* @param app
* @param namespace
* @param InstanceClass
* @return {function()}
* @private
Expand Down Expand Up @@ -152,8 +153,9 @@ export default {

/**
*
* @param namespace
* @param statics
* @param InstanceClass
* @param moduleName
* @return {function(App=)}
*/
moduleAndStatics<M: FirebaseModule, S: FirebaseStatics>(
Expand Down

0 comments on commit e73812a

Please sign in to comment.