Hi,
I know this is a recurring theme. But, I had to patch a method to add a null check. We do a lot of dynamic field generation. And, for some reason, we were hitting a bug where a dynamically added datasource field is causing dataSource.getFields() to return an array with a null entry. So, this null check is needed in DataSource.getFieldNames. I've tested this and it solves our problems with no apparent issues. Would you consider adding this check to the code so we don't have to maintain this patch permanently?
I know this is a recurring theme. But, I had to patch a method to add a null check. We do a lot of dynamic field generation. And, for some reason, we were hitting a bug where a dynamically added datasource field is causing dataSource.getFields() to return an array with a null entry. So, this null check is needed in DataSource.getFieldNames. I've tested this and it solves our problems with no apparent issues. Would you consider adding this check to the code so we don't have to maintain this patch permanently?
Code:
if (window.isc && isc.version.startsWith("v9.0")){ isc.DataSource.getPrototype().addProperties({ getFieldNames:function (_1){ if(isc.$cv)arguments.$cw=this; if(!_1)return isc.getKeys(this.getFields()); var _2=this.getFields(),_3=[],_4=0; for(var _5 in _2){ //9/17/13..added null check since a null field is getting included if(_2[_5]!=null && !_2[_5].hidden)_3[_4++]=_5 } return _3; } }) }
Comment