Repository navigation
DAV client: Check if array itself has property in for loop - #31
Conversation
|
@leonklingele-work did you test this with IE11 ? Would be good to also test with latest Safari, etc to make sure they all work properly with this method call. |
|
@PVince81 no, but it should be supported by every browser. Even IE6 supports it and it has been in the standards since. Steps to reproduce the issue I have:
Array.prototype.diff = function(a) {
return this.filter(function(i) {
return a.indexOf(i) < 0;
});
};
|
|
@leonklingele-work can you test it at least with IE11 then ? That's the one browser I usually don't trust much with "shoulds" 😉 |
|
Raised owncloud/core#28971 to upgrade the lib in ownCloud once this PR is merged. I wasn't aware that it would break OC features. Thanks. |
This prevents looping through properties of the array's prototype
1e8ae30 to
64a8081
Compare
|
The fix works fine in Safari 10 and IE11. |
|
Now thinking of it, would you mind adding a unit test for this ? Let me know if you need help. I suggest simply adding a global |
|
Sorry — unit tests are unrelated to this change. They should be provided in a separate PR. |
In general every PR should come with unit tests to validate that the change that was made is covered by tests. If you don't want to write unit tests I'm fine doing this myself, just let me know. |
|
As discussed on IRC, I'll take care of this. Thanks! |
|
pushed here: b375917 I verified that the test actually works by commenting out the changes in this PR, and the tests indeed failed. |
This prevents looping through properties of the array's prototype