[js] Couple of additional checks for module existence

This commit is contained in:
Chris Bianca 2017-05-31 15:45:14 +01:00
parent a1cff881e1
commit a162a0d6f5
2 changed files with 4 additions and 4 deletions

View File

@ -211,7 +211,7 @@ export default class Database extends Base {
} }
export const statics = { export const statics = {
ServerValue: { ServerValue: FirebaseDatabase ? {
TIMESTAMP: FirebaseDatabase.serverValueTimestamp || { '.sv': 'timestamp' }, TIMESTAMP: FirebaseDatabase.serverValueTimestamp || { '.sv': 'timestamp' },
}, } : {},
}; };

View File

@ -148,7 +148,7 @@ export const statics = {
CANCELLED: 'cancelled', CANCELLED: 'cancelled',
ERROR: 'error', ERROR: 'error',
}, },
Native: { Native: FirebaseStorage ? {
MAIN_BUNDLE_PATH: FirebaseStorage.MAIN_BUNDLE_PATH, MAIN_BUNDLE_PATH: FirebaseStorage.MAIN_BUNDLE_PATH,
CACHES_DIRECTORY_PATH: FirebaseStorage.CACHES_DIRECTORY_PATH, CACHES_DIRECTORY_PATH: FirebaseStorage.CACHES_DIRECTORY_PATH,
DOCUMENT_DIRECTORY_PATH: FirebaseStorage.DOCUMENT_DIRECTORY_PATH, DOCUMENT_DIRECTORY_PATH: FirebaseStorage.DOCUMENT_DIRECTORY_PATH,
@ -158,5 +158,5 @@ export const statics = {
LIBRARY_DIRECTORY_PATH: FirebaseStorage.LIBRARY_DIRECTORY_PATH, LIBRARY_DIRECTORY_PATH: FirebaseStorage.LIBRARY_DIRECTORY_PATH,
FILETYPE_REGULAR: FirebaseStorage.FILETYPE_REGULAR, FILETYPE_REGULAR: FirebaseStorage.FILETYPE_REGULAR,
FILETYPE_DIRECTORY: FirebaseStorage.FILETYPE_DIRECTORY, FILETYPE_DIRECTORY: FirebaseStorage.FILETYPE_DIRECTORY,
}, } : {},
}; };