From a49f1a6b5739419c7760a980d07e55cb2ae8c503 Mon Sep 17 00:00:00 2001 From: Manu MA Date: Fri, 9 Feb 2018 18:25:51 +0100 Subject: [PATCH] fix(init): componentDidLoad called twice Close #498 --- src/core/instance/init-component-instance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/instance/init-component-instance.ts b/src/core/instance/init-component-instance.ts index 4a064d70439..5aaf439bd6e 100644 --- a/src/core/instance/init-component-instance.ts +++ b/src/core/instance/init-component-instance.ts @@ -52,7 +52,7 @@ export function initComponentLoaded(plt: PlatformApi, elm: HostElement, hydrated // all is good, this component has been told it's time to finish loading // it's possible that we've already decided to destroy this element // check if this element has any actively loading child elements - if (elm._instance && !elm._hasDestroyed && (!elm.$activeLoading || !elm.$activeLoading.length)) { + if (!elm._hasLoaded && elm._instance && !elm._hasDestroyed && (!elm.$activeLoading || !elm.$activeLoading.length)) { // cool, so at this point this element isn't already being destroyed // and it does not have any child elements that are still loading