From 0f004af18dd8ba204fd80a68328fc48bf229e7f0 Mon Sep 17 00:00:00 2001 From: huangkairan <56213366+huangkairan@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:45:53 +0800 Subject: [PATCH] perf(web-extension): conditional check (#1360) Co-authored-by: Yun Feng --- .changeset/tidy-swans-repair.md | 5 +++++ packages/web-extension/src/pages/Player.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tidy-swans-repair.md diff --git a/.changeset/tidy-swans-repair.md b/.changeset/tidy-swans-repair.md new file mode 100644 index 0000000000..c0a2eeb212 --- /dev/null +++ b/.changeset/tidy-swans-repair.md @@ -0,0 +1,5 @@ +--- +'@rrweb/web-extension': patch +--- + +🎈 perf(web-extension): conditional check in Player component diff --git a/packages/web-extension/src/pages/Player.tsx b/packages/web-extension/src/pages/Player.tsx index b9744a8fa4..df0bf0aadf 100644 --- a/packages/web-extension/src/pages/Player.tsx +++ b/packages/web-extension/src/pages/Player.tsx @@ -27,7 +27,7 @@ export default function Player() { }); getEvents(sessionId) .then((events) => { - if (!playerElRef.current || !sessionId) return; + if (!playerElRef.current) return; const linkEl = document.createElement('link'); linkEl.href =