Don't throw errors in older versions of node/V8 that don't support the Set object. (#485)
Fixes #484.
This commit is contained in:
parent
4b9df6631f
commit
55f8c9d172
1 changed files with 1 additions and 1 deletions
|
@ -1197,7 +1197,7 @@ function safeCyclesArray() {
|
|||
* Choose the best safe cycle function from what is available - see
|
||||
* trentm/node-bunyan#445.
|
||||
*/
|
||||
var safeCycles = Set ? safeCyclesSet : safeCyclesArray;
|
||||
var safeCycles = typeof Set !== 'undefined' ? safeCyclesSet : safeCyclesArray;
|
||||
|
||||
/**
|
||||
* A fast JSON.stringify that handles cycles and getter exceptions (when
|
||||
|
|
Loading…
Reference in a new issue