From 0b5578754142329bf50b1d9ecc8dcce4ae66c1d1 Mon Sep 17 00:00:00 2001 From: JesmoDev <26099018+JesmoDev@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:18:27 +0200 Subject: [PATCH] make sonar happy --- packages/uui-radio/lib/uui-radio-group.element.ts | 8 ++++---- packages/uui-radio/lib/uui-radio.element.ts | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/uui-radio/lib/uui-radio-group.element.ts b/packages/uui-radio/lib/uui-radio-group.element.ts index cd76a8e39..037dd87f9 100644 --- a/packages/uui-radio/lib/uui-radio-group.element.ts +++ b/packages/uui-radio/lib/uui-radio-group.element.ts @@ -298,14 +298,14 @@ export class UUIRadioGroupElement extends UUIFormControlMixin(LitElement, '') { } #selectPreviousRadio() { - this.value = this.#findAdjacentRadioElement(-1)?.value || ''; - this.#radioElements[this.#selected || 0]?.focus(); + this.value = this.#findAdjacentRadioElement(-1)?.value ?? ''; + this.#radioElements[this.#selected ?? 0]?.focus(); this.#fireChangeEvent(); } #selectNextRadio() { - this.value = this.#findAdjacentRadioElement()?.value || ''; - this.#radioElements[this.#selected || 0]?.focus(); + this.value = this.#findAdjacentRadioElement()?.value ?? ''; + this.#radioElements[this.#selected ?? 0]?.focus(); this.#fireChangeEvent(); } diff --git a/packages/uui-radio/lib/uui-radio.element.ts b/packages/uui-radio/lib/uui-radio.element.ts index e29f83b83..b249ba92a 100644 --- a/packages/uui-radio/lib/uui-radio.element.ts +++ b/packages/uui-radio/lib/uui-radio.element.ts @@ -91,7 +91,6 @@ export class UUIRadioElement extends LitElement { public makeFocusable() { if (!this.disabled) { this.removeAttribute('tabindex'); - // this.setAttribute('tabindex', '0'); } } /**