From e36532367a1c1d94e72f7f0a92c567b0040ad9e6 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Tue, 14 May 2024 15:47:03 +0200 Subject: [PATCH] Ensure we don't error out when FastDesignProvider is undefined --- panel/theme/fast.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panel/theme/fast.py b/panel/theme/fast.py index fdc20696b1..b03743bc4b 100644 --- a/panel/theme/fast.py +++ b/panel/theme/fast.py @@ -146,7 +146,9 @@ class FastWrapper(ReactiveHTML): _scripts = { 'render': """ let accent, bg, luminance - if (window._JUPYTERLAB) { + if (!window.fastDesignProvider) { + return + } else if (window._JUPYTERLAB) { accent = getComputedStyle(document.body).getPropertyValue('--jp-brand-color0').trim(); bg = getComputedStyle(document.body).getPropertyValue('--jp-layout-color0').trim(); let color = getComputedStyle(document.body).getPropertyValue('--jp-ui-font-color0').trim();