[js] Couple of additional checks for module existence
This commit is contained in:
parent
a1cff881e1
commit
a162a0d6f5
|
@ -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' },
|
||||||
},
|
} : {},
|
||||||
};
|
};
|
||||||
|
|
|
@ -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,
|
||||||
},
|
} : {},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue