mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-07 06:59:46 +00:00
fix: drop the unreachable virtual-radio guard, keep honest evidence (#385 r2-M1)
An already-checked radio input fires no change event, so the same-binding guard on the virtual branch was dead code and its smoke assert vacuous. Removed both; a comment documents why the reset there is always legitimate. The candidate-list guard (the reachable path) stays tested. User-Visible: no Issue: #385
This commit is contained in:
@@ -12251,13 +12251,10 @@ public _renderMarkerDialog(): TemplateResult {
|
||||
<label class="srcrow">
|
||||
<input type="radio" name="bmode" .checked=${d.bindingMode === 'virtual'}
|
||||
@change=${() => {
|
||||
// #385(а): re-selecting the current binding must not reset
|
||||
// the configured value source or badge — spec #378 §1.6
|
||||
// demands the reset only on an actual CHANGE of binding.
|
||||
if (d.binding === 'virtual') {
|
||||
this.host._markerDialog = { ...d, bindingMode: 'virtual', bindingOpen: false };
|
||||
return;
|
||||
}
|
||||
// #385(а) r2-M1: no same-binding guard here on purpose — a
|
||||
// radio input fires no change event when it is already
|
||||
// checked, so this branch runs only on an actual switch to
|
||||
// virtual; the reset below is therefore always legitimate.
|
||||
const next = {
|
||||
...d, bindingMode: 'virtual' as const, binding: 'virtual', bindingOpen: false,
|
||||
controls: persistedExternalControls('virtual', d.controls),
|
||||
|
||||
Reference in New Issue
Block a user