From 02e728de0eacd0c39793cc35ea8951532d8bbe6c Mon Sep 17 00:00:00 2001 From: MattMo Date: Mon, 24 Oct 2022 08:40:30 -0700 Subject: [PATCH] Instead of calling update during the ignite template construction, it will be called during ready so that we are not in a rendering context when it is invoked. --- ignite-html-router.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ignite-html-router.js b/ignite-html-router.js index 5c9ab9f..00c08e6 100644 --- a/ignite-html-router.js +++ b/ignite-html-router.js @@ -1,4 +1,4 @@ -import { IgniteHtml } from "../ignite-html/ignite-html.js"; +import { IgniteHtml, IgniteRendering } from "../ignite-html/ignite-html.js"; import { IgniteElement } from "../ignite-html/ignite-element.js"; import { IgniteTemplate, slot, div, html } from "../ignite-html/ignite-template.js"; import { IgniteCallback, IgniteProperty} from "../ignite-html/ignite-html.js"; @@ -76,8 +76,8 @@ IgniteTemplate.prototype.route = function(routes, showCallback = null, hideCallb this._callbacks.push(managedPush); this._callbacks.push(managedPop); - //Create a constructor callback that will update the state upon first load. - this._constructors.push(update); + //Upon ready call update so our view is displayed if needed. + IgniteRendering.ready(update); return this; };