From af6eefd31a12a84a3eccc3edc7919336b776194b Mon Sep 17 00:00:00 2001 From: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:01:48 -0400 Subject: [PATCH 1/3] make initialize & singleton lines more explicit --- perf-next/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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] } From 937ab90efe4b583accc2bb1603113a1e51db8755 Mon Sep 17 00:00:00 2001 From: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com> Date: Mon, 23 Aug 2021 16:07:07 -0400 Subject: [PATCH 2/3] update link to config object content in docs --- perf/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = { // ... }; From 033a32ee5b37779224d7c65ce3e97ddfd86d3214 Mon Sep 17 00:00:00 2001 From: Rachel Saunders Date: Mon, 23 Aug 2021 16:46:46 -0400 Subject: [PATCH 3/3] ran tests for repo --- snippets/perf-next/index/perf_initialize_app.js | 4 ++-- snippets/perf-next/index/perf_singleton.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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