diff --git a/lib/stringify.js b/lib/stringify.js index fc05e23e..70d166a6 100644 --- a/lib/stringify.js +++ b/lib/stringify.js @@ -56,7 +56,7 @@ var isNonNullishPrimitive = function isNonNullishPrimitive(v) { || typeof v === 'bigint'; }; -var scSym = Symbol('SideChannel'); +var scSym = Object.create(null); var stringify = function stringify( object, @@ -84,7 +84,7 @@ var stringify = function stringify( // Where object last appeared in the ref tree var pos = tmpSc.get(object); step += 1; - if (pos != undefined) { + if (pos !== undefined) { if (pos === step) { throw new RangeError('Cyclic object value'); } else {