material-components-web-elm icon indicating copy to clipboard operation
material-components-web-elm copied to clipboard

JS Error opening a modal drawer

Open jamesfoster opened this issue 2 years ago • 1 comments

Version 8.0.1

When I click the button that sets config.drawerOpen to true, the below error occurs

JS Console image

Ref: https://github.com/aforemny/material-components-web/blob/edcc5c48e7b549224a81709cca2896fe01c76618/packages/mdc-drawer/component.ts#L171

Usage image

Seems there's a Non-Null Assertion where we should really be handling the null|undefined case.

jamesfoster avatar Oct 23 '21 23:10 jamesfoster

I don't know if this is a hint, but from the stack trace it's in "Dismissible Drawer" while I'm using a "Modal" drawer.

jamesfoster avatar Oct 23 '21 23:10 jamesfoster