diff --git a/lib/bunyan.js b/lib/bunyan.js index 6ed9e8a..7dfc385 100644 --- a/lib/bunyan.js +++ b/lib/bunyan.js @@ -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