[core][app][js] remove delete() app method as it only works on ios, wait for android sdk support.

This commit is contained in:
Salakar 2017-10-03 13:39:55 +01:00
parent 49d29b53f2
commit 4f6c387e3e
1 changed files with 9 additions and 7 deletions

View File

@ -109,13 +109,15 @@ export default class FirebaseApp {
* @return {Promise}
*/
delete() {
if (this._name === INTERNALS.STRINGS.DEFAULT_APP_NAME && this._nativeInitialized) {
return Promise.reject(
new Error('Unable to delete the default native firebase app instance.'),
);
}
return FirebaseCoreModule.deleteApp(this._name);
throw new Error(INTERNALS.STRINGS.ERROR_UNSUPPORTED_CLASS_METHOD('app', 'delete'));
// TODO only the ios sdk currently supports delete, add back in when android also supports it
// if (this._name === INTERNALS.STRINGS.DEFAULT_APP_NAME && this._nativeInitialized) {
// return Promise.reject(
// new Error('Unable to delete the default native firebase app instance.'),
// );
// }
//
// return FirebaseCoreModule.deleteApp(this._name);
}