Skip to content

Commit

Permalink
Checkboxradio.js (SVACE): do not always return the same value
Browse files Browse the repository at this point in the history
[Issue] SVACE 609510
[Problem] Warning Message:
	Refactor this function to not always return
	the same value.
[Solution] resign from early return and change condition respectively.

Signed-off-by: Grzegorz Czajkowski <g.czajkowski@samsung.com>
  • Loading branch information
grzegorz-czajkowski committed Apr 23, 2020
1 parent 1fe4171 commit 172ec23
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/js/support/mobile/widget/Checkboxradio.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@
var inputType = element.getAttribute("type"),
elementClassList = element.classList;

if (inputType !== "checkbox" && inputType !== "radio") {
//_build should always return element
return element;
if (inputType === "checkbox" || inputType === "radio") {
elementClassList.add(classes.UI_PREFIX + inputType);
}

elementClassList.add(classes.UI_PREFIX + inputType);

return element;
};

Expand Down

0 comments on commit 172ec23

Please sign in to comment.