Skip to content

Commit 971933f

Browse files
committed
Addressed comments
1 parent 0f58fb8 commit 971933f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s
66
function parse (text, reviver, options) {
77
// Normalize arguments
88
if (options == null) {
9-
if (reviver != null && typeof reviver === 'object') {
9+
if (reviver !== null && typeof reviver === 'object') {
1010
options = reviver
1111
reviver = undefined
1212
} else {
@@ -26,7 +26,7 @@ function parse (text, reviver, options) {
2626
}
2727

2828
// Ignore null and non-objects
29-
if (!obj || typeof obj !== 'object') {
29+
if (obj === null || typeof obj !== 'object') {
3030
return obj
3131
}
3232

0 commit comments

Comments
 (0)