From 4c4314a4a522c29f07f3b9971f13b5ba274dbda1 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 832bb1f5bb..50d0414071 100644 --- a/notebook/app.py +++ b/notebook/app.py @@ -340,7 +340,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