File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ export default defineNuxtModule<VueFireNuxtModuleOptions>({
208208 options . emulators
209209 ) {
210210 const emulators = await enableEmulators (
211- options . emulators ,
211+ options ,
212212 resolve ( nuxt . options . rootDir , 'firebase.json' ) ,
213213 logger
214214 )
@@ -389,7 +389,7 @@ declare module '@vue/runtime-core' {
389389}
390390
391391async function enableEmulators (
392- emulatorOptions : VueFireNuxtModuleOptions [ 'emulators' ] ,
392+ { emulators : emulatorOptions , auth } : VueFireNuxtModuleOptions ,
393393 firebaseJsonPath : string ,
394394 logger : typeof consola
395395) {
@@ -469,6 +469,12 @@ async function enableEmulators(
469469 return acc
470470 } , { } as FirebaseEmulatorsToEnable )
471471
472+ // remove the emulator if auth is not enabled
473+ if ( ! auth ) {
474+ // @ts -expect-error: cannot be deleted without ?: but that creates other errors
475+ delete emulatorsToEnable . auth
476+ }
477+
472478 return emulatorsToEnable
473479}
474480
You can’t perform that action at this time.
0 commit comments