fix
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,5 +5,5 @@
|
||||
/tmp/*
|
||||
/modules/*
|
||||
/templates/*
|
||||
/uploads/*
|
||||
|
||||
*.DS_Store
|
||||
@@ -38,7 +38,7 @@ function browse_uploads(target, width, height, scrollbar) {
|
||||
// Получаем элемент один раз для избежания повторных вызовов
|
||||
let targetElement = document.getElementById(target);
|
||||
|
||||
// Проверка на случай, если элемент вообще не найден (хотя в данном случае он найден)
|
||||
// Проверка на случай, если элемент вообще не найден
|
||||
if (!targetElement) {
|
||||
console.error("Элемент с ID " + target + " не найден.");
|
||||
return;
|
||||
@@ -46,11 +46,10 @@ function browse_uploads(target, width, height, scrollbar) {
|
||||
|
||||
let targetVal = targetElement.value;
|
||||
|
||||
// ИСПРАВЛЕНИЕ: Безопасная проверка .dataset.default
|
||||
// проверка .dataset.default
|
||||
let datasetDefault = targetElement.dataset.default;
|
||||
|
||||
// Проверяем, пусто ли текущее значение И существует ли data-default со значением.
|
||||
// Это новый безопасный код для строки 38.
|
||||
if (!targetElement.value.length && datasetDefault && datasetDefault.length) {
|
||||
targetVal = datasetDefault;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 323 B |
BIN
uploads/gallery/watermark.png
Normal file
BIN
uploads/gallery/watermark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 580 B |
Reference in New Issue
Block a user