This is great! but how do you handle admin.initializeApp throwing "Error: The default Firebase app already exists. This means you called initializeApp() more than once without providing an app name as the second argument. In most cases you only need to call initializeApp() once." ?
This is great! but how do you handle admin.initializeApp throwing "Error: The default Firebase app already exists. This means you called initializeApp() more than once without providing an app name as the second argument. In most cases you only need to call initializeApp() once." ?
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}