Added null check to download notes.
This commit is contained in:
@@ -3636,6 +3636,7 @@ class DownloadView {
|
|||||||
infosHtml.append.apply(infosHtml, modelInfosHtml);
|
infosHtml.append.apply(infosHtml, modelInfosHtml);
|
||||||
|
|
||||||
const downloadNotes = this.elements.downloadNotes;
|
const downloadNotes = this.elements.downloadNotes;
|
||||||
|
if (downloadNotes !== undefined && downloadNotes !== null) {
|
||||||
downloadNotes.addEventListener("change", (e) => {
|
downloadNotes.addEventListener("change", (e) => {
|
||||||
const modelInfoNotes = infosHtml.querySelectorAll(`textarea.model-info-notes`);
|
const modelInfoNotes = infosHtml.querySelectorAll(`textarea.model-info-notes`);
|
||||||
const disabled = !e.currentTarget.checked;
|
const disabled = !e.currentTarget.checked;
|
||||||
@@ -3645,6 +3646,7 @@ class DownloadView {
|
|||||||
});
|
});
|
||||||
downloadNotes.checked = settings["download-save-description-as-text-file"].checked;
|
downloadNotes.checked = settings["download-save-description-as-text-file"].checked;
|
||||||
downloadNotes.dispatchEvent(new Event('change'));
|
downloadNotes.dispatchEvent(new Event('change'));
|
||||||
|
}
|
||||||
|
|
||||||
const hideSearchButtons = settings["text-input-always-hide-search-button"].checked;
|
const hideSearchButtons = settings["text-input-always-hide-search-button"].checked;
|
||||||
this.elements.searchButton.style.display = hideSearchButtons ? "none" : "";
|
this.elements.searchButton.style.display = hideSearchButtons ? "none" : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user