SpRestLib icon indicating copy to clipboard operation
SpRestLib copied to clipboard

cols() error on SP2016

Open danielstaleyedf opened this issue 4 years ago • 0 comments

I haven't check SharePoint Online but commit 8f55385 of sprestlib.js is outputing an error.

The rest response puts the data in a 'results' property of 'Fields'.

Updating line 1245 to the following fixes the issue:
(arrData && arrData[0] && arrData[0].Fields && (Array.isArray(arrData[0].Fields) || arrData[0].Fields.results) ? (Array.isArray(arrData[0].Fields) ? arrData[0].Fields : arrData[0].Fields.results) : [] );

danielstaleyedf avatar Dec 04 '19 10:12 danielstaleyedf