Skip to content

Commit 5f8fb85

Browse files
committed
fix: Remove redundant key attributes from <tbody> elements and prevent duplicate Switchery initializations.
1 parent 87e739e commit 5f8fb85

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/tabs/ConfigurationTab.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
<th scope="col">{{ $t("configurationFeatureHelp") }}</th>
209209
</tr>
210210
</thead>
211-
<tbody :key="featureMask">
211+
<tbody>
212212
<template v-for="feature in featuresList" :key="feature.bit">
213213
<tr v-if="feature.mode !== 'select'">
214214
<td>
@@ -610,7 +610,7 @@
610610
</th>
611611
</tr>
612612
</thead>
613-
<tbody :key="dshotDisabledMask">
613+
<tbody>
614614
<tr v-for="cond in dshotBeaconConditionsList" :key="cond.bit">
615615
<td>
616616
<input
@@ -657,7 +657,7 @@
657657
<th scope="col">{{ $t("configurationFeatureDescription") }}</th>
658658
</tr>
659659
</thead>
660-
<tbody class="beeper-configuration" :key="beeperDisabledMask">
660+
<tbody class="beeper-configuration">
661661
<tr
662662
v-for="beeper in beepersList"
663663
:key="beeper.bit"

src/js/gui.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ class GuiControl {
255255
const COLOR_SWITCHERY_SECOND = "var(--switcherysecond)";
256256

257257
$(".togglesmall").each(function (index, elem) {
258+
if ($(elem).next(".switchery").length) return;
258259
const switchery = new Switchery(elem, {
259260
size: "small",
260261
color: COLOR_ACCENT,
@@ -267,6 +268,7 @@ class GuiControl {
267268
});
268269

269270
$(".toggle").each(function (index, elem) {
271+
if ($(elem).next(".switchery").length) return;
270272
const switchery = new Switchery(elem, {
271273
color: COLOR_ACCENT,
272274
secondaryColor: COLOR_SWITCHERY_SECOND,
@@ -278,6 +280,7 @@ class GuiControl {
278280
});
279281

280282
$(".togglemedium").each(function (index, elem) {
283+
if ($(elem).next(".switchery").length) return;
281284
const switchery = new Switchery(elem, {
282285
className: "switcherymid",
283286
color: COLOR_ACCENT,

0 commit comments

Comments
 (0)