Skip to content

Commit

Permalink
fix(firebase-config): Fix loading of config variables
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsmaerten committed Sep 9, 2017
1 parent 9b0652e commit b5e9d5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/clients/firebase-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ export default class FirebaseClient {
private static _instance: FirebaseClient

private constructor() {
admin.initializeApp(
(global as any).peppermintFirebaseConfig.firebase ||
functions.config().firebase
)
const config =
(global as any).peppermintFirebaseConfig || functions.config()
admin.initializeApp(config.firebase)
}

public static getInstance() {
Expand Down
3 changes: 3 additions & 0 deletions test/eventhandlers/connect-user.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ describe("Peppermint.connectUser", () => {
dropbox: {
client_id: "XXX",
client_secret: "XXX"
},
oauth: {
redirect_after_connect: "https://google.com"
}
}
}
Expand Down

0 comments on commit b5e9d5e

Please sign in to comment.