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
Hey I think I've come across an issue. When I try to fetch audits on an auditable model, it seems that if an audit entry's oldValues is null, it's unable to parse and it throws this error:
SyntaxError: "[object Object]" is not valid JSON at JSON.parse (<anonymous>) at Object.consume (file:///node_modules/@stouder-io/adonis-auditing/build/index.js:57:38)
Have I configured something wrong? I have tested this solution and it seems to have fixed it:
consume: (value)=>{if(!value)returnnull;if(typeofvalue==='object')returnvalue;try{returnJSON.parse(value);}catch(e){console.error("Failed to parse value:",value,e);returnnull}}
The text was updated successfully, but these errors were encountered:
Hey I think I've come across an issue. When I try to fetch audits on an auditable model, it seems that if an audit entry's oldValues is null, it's unable to parse and it throws this error:
Have I configured something wrong? I have tested this solution and it seems to have fixed it:
The text was updated successfully, but these errors were encountered: