1
0
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:
Kushagra Gour 2022-04-03 11:25:50 +05:30 committed by GitHub
commit fe6ee271cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {