Pretius / Pretius-APEX-Enhanced-Lov-Item

Oracle APEX plugin
MIT License
24 stars 11 forks source link

Problems with iterating over an array #62

Open kdima71 opened 3 years ago

kdima71 commented 3 years ago

Hello!

I found that throughout the JS code, iterating over an array is done as an object. For example:

for (var i in pData.data) {

This leads to errors if, somewhere in other JS code on the page, the array prototype has been extended with an additional method or function, For example:

 Array.prototype.insert = function (index, item) {
     this.splice (index, 0, item);
 };

Why isn't the array intervening done like this ???

for (var i = 0; i <pData.data.length; i ++) {