SpRestLib
SpRestLib copied to clipboard
cols() error on SP2016
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) : [] );