fix: Icon picker duplicate variable declaration
- Add guard to prevent double initialization - Remove duplicate currentTargetInput declaration
This commit is contained in:
parent
e9d2fcf1c0
commit
d652e24ad0
|
|
@ -84,9 +84,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
let currentTargetInput = null;
|
if (window.iconPickerInitialized) return;
|
||||||
|
window.iconPickerInitialized = true;
|
||||||
|
|
||||||
const icons = [
|
var currentTargetInput = null;
|
||||||
|
var icons = [
|
||||||
{ name: 'fa-server', label: 'Сервер' },
|
{ name: 'fa-server', label: 'Сервер' },
|
||||||
{ name: 'fa-desktop', label: 'Компьютер' },
|
{ name: 'fa-desktop', label: 'Компьютер' },
|
||||||
{ name: 'fa-laptop', label: 'Ноутбук' },
|
{ name: 'fa-laptop', label: 'Ноутбук' },
|
||||||
|
|
@ -371,8 +373,6 @@
|
||||||
{ name: 'fa-server-stacked', label: 'Серверы стопка' }
|
{ name: 'fa-server-stacked', label: 'Серверы стопка' }
|
||||||
];
|
];
|
||||||
|
|
||||||
let currentTargetInput = null;
|
|
||||||
|
|
||||||
function renderIcons(filter = '') {
|
function renderIcons(filter = '') {
|
||||||
const grid = document.getElementById('iconGrid');
|
const grid = document.getElementById('iconGrid');
|
||||||
if (!grid) return;
|
if (!grid) return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue