diff --git a/CHANGELOG.md b/CHANGELOG.md index d83dc30eaaa..6e9d13962a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed some IE11 flex box bugs and documented others (modal overflowing, image shrinking, and flex group wrapping) ([#973](https://github.com/elastic/eui/pull/973)) - Fixed white square that show in double scollbar via `euiScrollBar()` ([989](https://github.com/elastic/eui/pull/989)) +- Fixed issue with Accordion would attempt to use properties and accessors on null ([#982](https://github.com/elastic/eui/pull/982)) ## [`1.1.0`](https://github.com/elastic/eui/tree/v1.1.0) diff --git a/src/components/accordion/accordion.js b/src/components/accordion/accordion.js index 9152027493a..858b8835b48 100644 --- a/src/components/accordion/accordion.js +++ b/src/components/accordion/accordion.js @@ -37,8 +37,8 @@ export class EuiAccordion extends Component { setChildContentHeight = () => { requestAnimationFrame(() => { - const height = this.state.isOpen ? this.childContent.clientHeight : 0; - this.childWrapper.setAttribute('style', `height: ${height}px`); + const height = this.childContent && this.state.isOpen ? this.childContent.clientHeight : 0; + this.childWrapper && this.childWrapper.setAttribute('style', `height: ${height}px`); }); }