Skip to content

Commit

Permalink
refactor: import getMessaging from messaging/sw (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
thatfiredev committed Feb 3, 2023
1 parent 7ca0947 commit b48560b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion messaging-next/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function initInSw() {

function onBackgroundMessage() {
// [START messaging_on_background_message]
const { getMessaging } = require("firebase/messaging");
const { getMessaging } = require("firebase/messaging/sw");
const { onBackgroundMessage } = require("firebase/messaging/sw");

const messaging = getMessaging();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// 'npm run snippets'.

// [START messaging_on_background_message_modular]
import { getMessaging } from "firebase/messaging";
import { getMessaging } from "firebase/messaging/sw";
import { onBackgroundMessage } from "firebase/messaging/sw";

const messaging = getMessaging();
Expand Down

1 comment on commit b48560b

@HMSALNGM
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android:4086536922265579220

Please sign in to comment.