Return empty array for circular references

This commit is contained in:
Kevin Sawicki 2016-07-11 09:53:06 -07:00
parent ab1786c17d
commit 2cc2b8a146

View file

@ -31,7 +31,7 @@ var wrapArgs = function (args, visited) {
if (Array.isArray(value)) {
return {
type: 'array',
value: wrapArgs(value, visited)
value: isCircular(value, visited) ? [] : wrapArgs(value, visited)
}
} else if (Buffer.isBuffer(value)) {
return {