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.
This commit is contained in:
parent
3a16c62b92
commit
02e728de0e
@ -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 { IgniteElement } from "../ignite-html/ignite-element.js";
|
||||||
import { IgniteTemplate, slot, div, html } from "../ignite-html/ignite-template.js";
|
import { IgniteTemplate, slot, div, html } from "../ignite-html/ignite-template.js";
|
||||||
import { IgniteCallback, IgniteProperty} from "../ignite-html/ignite-html.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(managedPush);
|
||||||
this._callbacks.push(managedPop);
|
this._callbacks.push(managedPop);
|
||||||
|
|
||||||
//Create a constructor callback that will update the state upon first load.
|
//Upon ready call update so our view is displayed if needed.
|
||||||
this._constructors.push(update);
|
IgniteRendering.ready(update);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user