Skip to content

Conversation

miguskar
Copy link

The embed() function is called twice in rapid succession on loading the component, once in onChanges, and once in ngOnInit. The second of which tries to load data into the existing frame which in some situations hasn't been inserted into the dom yet.

To avoid this behavior, this PR simply returns in the first onChanges call.

Please see stackblitz: app and source

This is the error message thrown:
error message

This caused two rapid loads, one in ngOnChanges and one in ngOnInit. The second of which tried to load data into the existing frame which hadn't been inserted into the dom yet.
@miguskar miguskar changed the title fix(component): dont load the app on first change. fix(component): dont call embed on first change. Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant