mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
[for-each] has-own-prop issue node
This commit is contained in:
@@ -48,4 +48,16 @@ describe('utils::forEach', function () {
|
||||
|
||||
expect(count).toEqual(1);
|
||||
});
|
||||
|
||||
it('should handle non object prototype gracefully', function () {
|
||||
var count = 0;
|
||||
var data = Object.create(null);
|
||||
data.foo = 'bar'
|
||||
|
||||
forEach(function () {}, function () {
|
||||
count++;
|
||||
});
|
||||
|
||||
expect(count).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user