From ca2ce8d016a7f2dda4d93343e5035d83ba009c17 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 2 Feb 2024 14:19:49 +0000 Subject: [PATCH] Add the custom CSS handler is `self.custom_css` is set --- notebook/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebook/app.py b/notebook/app.py index 9a969b50a7..55795b359a 100644 --- a/notebook/app.py +++ b/notebook/app.py @@ -354,7 +354,8 @@ def initialize_handlers(self) -> None: self.handlers.append(("/edit(.*)", FileHandler)) self.handlers.append(("/consoles/(.*)", ConsoleHandler)) self.handlers.append(("/terminals/(.*)", TerminalHandler)) - self.handlers.append(("/custom/custom.css", CustomCssHandler)) + if self.custom_css: + self.handlers.append(("/custom/custom.css", CustomCssHandler)) super().initialize_handlers() def initialize(self, argv: list[str] | None = None) -> None: # noqa: ARG002