Skip to content

Commit 1ca4617

Browse files
committed
Tests: Update domEqual() to work with jQuery git
jQuery now returns `null` for empty attributes instead of `undefined`. Ref gh-1516 (cherry picked from commit e4363ab)
1 parent 6fd43da commit 1ca4617

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/testsuite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ window.domEqual = function( selector, modifier, message ) {
301301
result = {};
302302
$.each( properties, function( index, attr ) {
303303
var value = elem.prop( attr );
304-
result[ attr ] = value !== undefined ? value : "";
304+
result[ attr ] = value != null ? value : "";
305305
});
306306
$.each( attributes, function( index, attr ) {
307307
var value = elem.attr( attr );
308-
result[ attr ] = value !== undefined ? value : "";
308+
result[ attr ] = value != null ? value : "";
309309
});
310310
result.style = getElementStyles( elem[ 0 ] );
311311
result.events = $._data( elem[ 0 ], "events" );

0 commit comments

Comments
 (0)