webpack:/./node_modules/@healthcatalyst/cashmere/fesm2020/healthcatalyst-cashmere.mjs in close on line 11552:14
/** Closes the modal with a result.
* Use this close method when opening a modal using a TemplateRef.
* To close a modal that was created from a Component, inject ActiveModal and use the close method
* on ActiveModal */
close(result) {
this.removeModalElements();
this._result.next(result);
}
/** Dismisses the modal with no result.
* Use this dismiss method when opening a modal using a TemplateRef.
* To dismiss a modal that was created from a Component, inject ActiveModal and use the dismiss method
webpack:/./node_modules/@healthcatalyst/cashmere/fesm2020/healthcatalyst-cashmere.mjs in close on line 11765:19
Summary
When closing a modal under some conditions an error (Cannot read properties of null (reading 'removeChild')) occurs during tear-down.
Additional context
Call Stack: webpack:/./node_modules/@healthcatalyst/cashmere/fesm2020/healthcatalyst-cashmere.mjs in removeModalElements on line 11565:44
webpack:/./node_modules/@healthcatalyst/cashmere/fesm2020/healthcatalyst-cashmere.mjs in close on line 11552:14
webpack:/./node_modules/@healthcatalyst/cashmere/fesm2020/healthcatalyst-cashmere.mjs in close on line 11765:19
Original call:
this._activeModal.close(false);
Suggested Fix