Skip to content

Commit

Permalink
Merge 6cd07e2 into 03e97b8
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchenshi authored Apr 16, 2021
2 parents 03e97b8 + 6cd07e2 commit 5964360
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/database/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ try {
// @firebase/app when used together with the js sdk. More detail:
// https://github.com/firebase/firebase-js-sdk/issues/1696#issuecomment-501546596
// eslint-disable-next-line import/no-extraneous-dependencies, @typescript-eslint/no-require-imports
const firebase = require('@firebase/app').default;
registerDatabase(firebase);
const firebase = require('@firebase/app').default; // Only present for v8, undefined for v9 (should skip).
if (firebase) {
registerDatabase(firebase);
}
} catch (err) {
// catch and ignore 'MODULE_NOT_FOUND' error in firebase-admin context
// we can safely ignore this error because RTDB in firebase-admin works without @firebase/app
Expand Down

0 comments on commit 5964360

Please sign in to comment.