From 946072fc5a05e982a220a4afa070cb59c7a037d1 Mon Sep 17 00:00:00 2001 From: Aaron Klinker Date: Sat, 10 Feb 2024 04:04:16 -0600 Subject: [PATCH] docs: Fix `createShadowRootUi` unmount calls --- docs/guide/content-script-ui.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guide/content-script-ui.md b/docs/guide/content-script-ui.md index 135898b2..6fa3b411 100644 --- a/docs/guide/content-script-ui.md +++ b/docs/guide/content-script-ui.md @@ -233,7 +233,7 @@ export default defineContentScript({ }, onRemove: (app) => { // Unmount the app when the UI is removed - app.unmount(); + app?.unmount(); }, }); @@ -268,7 +268,7 @@ export default defineContentScript({ }, onRemove: (root) => { // Unmount the root when the UI is removed - root.unmount(); + root?.unmount(); }, }); @@ -303,7 +303,7 @@ export default defineContentScript({ }, onRemove: (app) => { // Destroy the app when the UI is removed - app.$destroy(); + app?.$destroy(); }, }); @@ -335,7 +335,7 @@ export default defineContentScript({ }, onRemove: (unmount) => { // Unmount the app when the UI is removed - unmount(); + unmount?.(); }, });