davidtheclark / react-aria-modal

A fully accessible React modal built according WAI-ARIA Authoring Practices
http://davidtheclark.github.io/react-aria-modal/demo/
MIT License
1.03k stars 96 forks source link

Fix unmount crash #136

Closed mdnsk closed 8 months ago

mdnsk commented 8 months ago

@tristen, have a look on this MR, please :)

mdnsk commented 8 months ago

@tristen, there is still old files in dist folder in react-aria-modal@5.0.1 🤔

    // dist/react-aria-modal.js
    // ...

    {
      key: "componentWillUnmount",
      value: function componentWillUnmount() {
        if (!options.renderTo) {
          this.state.container.parentNode.removeChild(this.state.container);
        }
      }
    }

    // ...

Looks like prepublish script hasn't been run before publishing a new version.

tristen commented 8 months ago

Ahh thanks @mdnsk. Looks like prepublish is deprecated. Will fix!