Skip to content

fix(component): dont call embed on first change. #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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