[internals][js] invert namespace check

This commit is contained in:
Salakar 2018-08-18 16:48:51 +01:00
parent e0e0389887
commit d33233389b
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ export default {
InstanceClass: Class<M>
): () => FirebaseModule {
return (customUrlOrRegion: ?string = null): M => {
if (customUrlOrRegion && CUSTOM_URL_OR_REGION_NAMESPACES[namespace]) {
if (customUrlOrRegion && !CUSTOM_URL_OR_REGION_NAMESPACES[namespace]) {
throw new Error(
INTERNALS.STRINGS.ERROR_INIT_SERVICE_URL_OR_REGION_UNSUPPORTED(
namespace