Please check if your PR fulfills the following requirements:
[V] The commit message follows our guidelines: CONTRIBUTING.md#commit
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
[V] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
What is the current behavior?
Because we're using the ngDoCheck hook there are cases that it has been called multiple times. For ex. when a loader component appears more than once upon user event. The comRef is getting cleared at the first time and when it calls it again we're getting an error.
Issue Number: N/A
What is the new behavior?
Added protection in onDestroy to verify there is an instance of comRef before destroying it.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Because we're using the ngDoCheck hook there are cases that it has been called multiple times. For ex. when a loader component appears more than once upon user event. The comRef is getting cleared at the first time and when it calls it again we're getting an error.
Issue Number: N/A
What is the new behavior?
Added protection in onDestroy to verify there is an instance of comRef before destroying it.
Does this PR introduce a breaking change?
Other information