diff --git a/perf-next/index.js b/perf-next/index.js index 83fce95c..e41aa1b0 100644 --- a/perf-next/index.js +++ b/perf-next/index.js @@ -13,18 +13,18 @@ function intialize() { // [START perf_initialize_app] // TODO: Replace the following with your app's Firebase project configuration - // See: https://firebase.google.com/docs/web/setup#config-object + // See: https://firebase.google.com/docs/web/learn-more#config-object const firebaseConfig = { // ... }; // Initialize Firebase - initializeApp(firebaseConfig); + const app = initializeApp(firebaseConfig); // [END perf_initialize_app] // [START perf_singleton] // Initialize Performance Monitoring and get a reference to the service - const perf = getPerformance(); + const perf = getPerformance(app); // [END perf_singleton] } diff --git a/perf/index.js b/perf/index.js index d1d61202..c5ae8b22 100644 --- a/perf/index.js +++ b/perf/index.js @@ -10,7 +10,7 @@ const perf = firebase.performance(); function intialize() { // [START perf_initialize_app] // TODO: Replace the following with your app's Firebase project configuration - // See: https://firebase.google.com/docs/web/setup#config-object + // See: https://firebase.google.com/docs/web/learn-more#config-object const firebaseConfig = { // ... }; diff --git a/snippets/perf-next/index/perf_initialize_app.js b/snippets/perf-next/index/perf_initialize_app.js index 74f23a66..94e0c966 100644 --- a/snippets/perf-next/index/perf_initialize_app.js +++ b/snippets/perf-next/index/perf_initialize_app.js @@ -6,11 +6,11 @@ // [START perf_initialize_app_modular] // TODO: Replace the following with your app's Firebase project configuration -// See: https://firebase.google.com/docs/web/setup#config-object +// See: https://firebase.google.com/docs/web/learn-more#config-object const firebaseConfig = { // ... }; // Initialize Firebase -initializeApp(firebaseConfig); +const app = initializeApp(firebaseConfig); // [END perf_initialize_app_modular] \ No newline at end of file diff --git a/snippets/perf-next/index/perf_singleton.js b/snippets/perf-next/index/perf_singleton.js index 38ccb439..e070b52b 100644 --- a/snippets/perf-next/index/perf_singleton.js +++ b/snippets/perf-next/index/perf_singleton.js @@ -6,5 +6,5 @@ // [START perf_singleton_modular] // Initialize Performance Monitoring and get a reference to the service -const perf = getPerformance(); +const perf = getPerformance(app); // [END perf_singleton_modular] \ No newline at end of file