Skip to content

Commit

Permalink
Merge a553b4c into 364e336
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchenshi authored Apr 20, 2021
2 parents 364e336 + a553b4c commit c447873
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 c447873

Please sign in to comment.