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) => {