Skip to content

Prevent errors when fastboot-body-end is not present.#763

Merged
rwjblue merged 1 commit intomasterfrom
avoid-errors
Jun 10, 2020
Merged

Prevent errors when fastboot-body-end is not present.#763
rwjblue merged 1 commit intomasterfrom
avoid-errors

Conversation

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Jun 10, 2020

The current implementation of clear-double-render guards for when fastboot-body-start is not present, but does not check if fastboot-body-end is present before attempting to remove it (therefore causing an Cannot call 'parentElement' of null error).

Note: There are still some issues with this approach (e.g. why is fastboot-body-start present but fastboot-body-end is missing), and this change does not directly address all of the issues. It does prevent a masking error from happening.

The current implementation of `clear-double-render` guards for when
`fastboot-body-start` is not present, but does not check if
`fastboot-body-end` is present before attempting to remove it (therefore
causing an `Cannot call 'parentElement' of null` error).

Note: There are still some issues with this approach (e.g. why is
`fastboot-body-start` present but `fastboot-body-end` is missing), and
this change does not directly address all of the issues. It **does**
prevent a masking error from happening.
@rwjblue rwjblue added the bug label Jun 10, 2020
@SergeAstapov
Copy link
Contributor

@rwjblue just FYI and for future travelers:
we had this issue in our app due to invalid HTML coming from 3rd party system that we inject in our app (had missing </div>) that broke DOM structure.

@rwjblue rwjblue merged commit 507e025 into master Jun 10, 2020
@rwjblue rwjblue deleted the avoid-errors branch June 10, 2020 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants