Skip to content

Commit 50c62fd

Browse files
committed
No ticket: Fix version comparison. Thanks @Krinkle!
1 parent aaa2df6 commit 50c62fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/attributes.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ test( "attrHooks[\"value\"]", function() {
7171
});
7272

7373
expectWarning( "button.attr(...)", 0, function() {
74-
var button = jQuery("#button");
75-
if ( jQuery.fn.jquery >= "1.9" ) {
74+
var button = jQuery("#button"),
75+
majorMinorPatch = jQuery.fn.jquery.split(".");
76+
77+
// Respect the jQuery 1.9.0+ behavior change
78+
if ( majorMinorPatch[0] > 1 || ( majorMinorPatch[0] === "1" && majorMinorPatch[1] >= 9 ) ) {
7679
equal( button.attr("value"), undefined, "button.attr('value') returns attribute." );
7780
} else {
7881
equal( button.attr("value"), "", "button.attr('value') returns empty string." );

0 commit comments

Comments
 (0)