From 5c1223ee6a02a45162100efbe8461b907bf89ed8 Mon Sep 17 00:00:00 2001 From: Mikhail Bodrov Date: Mon, 27 Dec 2021 23:19:02 +0200 Subject: [PATCH] Use void undefined --- lib/stringify.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stringify.js b/lib/stringify.js index ddfe3d36..47ea4b15 100644 --- a/lib/stringify.js +++ b/lib/stringify.js @@ -80,7 +80,7 @@ var stringify = function stringify( var tmpSc = sideChannel; var step = 0; var findFlag = false; - while (typeof (tmpSc = tmpSc.get(sentinel)) !== 'undefined' && !findFlag) { + while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { // Where object last appeared in the ref tree var pos = tmpSc.get(object); step += 1; @@ -142,7 +142,7 @@ var stringify = function stringify( var objKeys; if (generateArrayPrefix === 'comma' && isArray(obj)) { // we need to join elements in - objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : (void 0) }]; + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; } else if (isArray(filter)) { objKeys = filter; } else {