Skip to content

Commit eb122b7

Browse files
committed
feat(admin): also check for FUNCTION_NAME env
1 parent 780e016 commit eb122b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/nuxt/src/runtime/admin/plugin.server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ export default defineNuxtPlugin((nuxtApp) => {
2323
FIREBASE_PRIVATE_KEY,
2424
// set on firebase cloud functions
2525
FIREBASE_CONFIG,
26+
// in cloud functions, we can auto initialize
27+
FUNCTION_NAME,
2628
} = process.env
2729

28-
if (FIREBASE_CONFIG) {
30+
if (FIREBASE_CONFIG || FUNCTION_NAME) {
2931
console.log('[VueFire]: using FIREBASE_CONFIG env variable')
3032
initializeApp()
3133
} else {

0 commit comments

Comments
 (0)