Skip to content

Commit

Permalink
patch: optimize code.
Browse files Browse the repository at this point in the history
  • Loading branch information
liaokunhua committed Dec 5, 2021
1 parent ec25fbd commit 4d81e9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/stringify.js
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4d81e9c

Please sign in to comment.