You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CDataTable uses JSON.stringify in objectsAreIdentical. When items contains objects with circular references, JSON.stringify throws an error, and this will happen every time items or sortedItems changes.
This can be fixed by using a cache and providing a function to JSON.stringify to avoid circular references, like this example:
exportconstcustomStringify=function(v: any){constcache=newMap();returnJSON.stringify(v,function(key,value){if(typeofvalue==='object'&&value!==null){if(cache.get(value)){// Circular reference found, discard keyreturn;}// Store value in our collectioncache.set(value,true);}returnvalue;});};
CDataTable
usesJSON.stringify
inobjectsAreIdentical
. Whenitems
contains objects with circular references,JSON.stringify
throws an error, and this will happen every timeitems
orsortedItems
changes.This can be fixed by using a cache and providing a function to
JSON.stringify
to avoid circular references, like this example:from here
The text was updated successfully, but these errors were encountered: