Skip to content

Commit fdafdd7

Browse files
committed
Core: prevent unnecessary $() rewrapping, re-use local var instead
1 parent a0ed6f8 commit fdafdd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ $.extend($.validator, {
555555
if ( type === "radio" || type === "checkbox" ) {
556556
return $("input[name='" + element.name + "']:checked").val();
557557
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
558-
return element.validity.badInput ? false : $(element).val();
558+
return element.validity.badInput ? false : $element.val();
559559
}
560560

561561
val = $element.val();

0 commit comments

Comments
 (0)