From d5f082843ba1b81ef2258f528d1bf0d31794f392 Mon Sep 17 00:00:00 2001 From: MattMo Date: Wed, 17 Sep 2025 11:14:50 -0700 Subject: [PATCH] Fixed a null ref issue when trying to route an element that hasn't been constructed yet. --- ignite-html-router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite-html-router.js b/ignite-html-router.js index d57f978..8a3dcc7 100644 --- a/ignite-html-router.js +++ b/ignite-html-router.js @@ -20,7 +20,7 @@ IgniteTemplate.prototype.route = function (routes, showCallback = null, hideCall } //By default hide this route. - this.element.style.setProperty("display", "none", "important"); + this.element?.style.setProperty("display", "none", "important"); //Create an update method that will be used to check and see if the route is met. var update = (event) => {