mirror of
https://github.com/chinchang/web-maker.git
synced 2025-05-11 12:55:22 +02:00
Merge pull request #508 from chinchang/v5-fix-507
v5: Fix Type-Error on opening Modals
This commit is contained in:
commit
fe6ee271cf
@ -46,7 +46,7 @@ const Modal = ({
|
|||||||
if (show) {
|
if (show) {
|
||||||
// HACK: refs will evaluate on next tick due to portals
|
// HACK: refs will evaluate on next tick due to portals
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const closeButton = this.overlayEl.querySelector(
|
const closeButton = overlayRef.current.querySelector(
|
||||||
'.js-modal__close-btn'
|
'.js-modal__close-btn'
|
||||||
);
|
);
|
||||||
if (closeButton) {
|
if (closeButton) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user