mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-05-08 07:35:38 +08:00
fix:jqLite: Normalize non-existing attributes to undefined as jQuery
jqLite was returning null, but jQuery returns undefined
This commit is contained in:
@@ -162,6 +162,10 @@ describe('jqLite', function(){
|
||||
expect(select.attr('multiple')).toEqual(true);
|
||||
});
|
||||
|
||||
it('should return undefined for non-existing attributes', function() {
|
||||
var elm = jqLite('<div class="any">a</div>');
|
||||
expect(elm.attr('non-existing')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user