Open MaiRizk opened 2 years ago
The same issue is in my local as well.
UPDATE:
The solution I found is to defend against the possibility of elRef.current
being null.
Just add the line to if block:
if(elRef.current) {
modalRoot.appendChild(elRef.current);
}
This error is there when I try to showModal using Modal.js Uncaught TypeError: Cannot read properties of null (reading 'appendChild') at Modal.js:13