diff --git a/src/js/modal.js b/src/js/modal.js index e752114..d5c6d3f 100644 --- a/src/js/modal.js +++ b/src/js/modal.js @@ -51,9 +51,11 @@ const Modal = { }) }, close () { - const printFrame = document.getElementById('printJS-Modal') + const printModal = document.getElementById('printJS-Modal') - printFrame.parentNode.removeChild(printFrame) + if (printModal) { + printModal.parentNode.removeChild(printModal) + } } }