Commit 26a11776 authored by dvsilch's avatar dvsilch Committed by AUTOMATIC1111

fix: add null check when start running project the currentButton is null

parent c57919ea
......@@ -31,7 +31,7 @@ function updateOnBackgroundChange() {
}
})
if (modalImage.src != currentButton.children[0].src) {
if (currentButton?.children?.length > 0 && modalImage.src != currentButton.children[0].src) {
modalImage.src = currentButton.children[0].src;
if (modalImage.style.display === 'none') {
modal.style.setProperty('background-image', `url(${modalImage.src})`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment