cvent / json-schema-deref-sync

Synchronous json schema dereference utility
http://bojand.github.io/json-schema-deref-sync
MIT License
35 stars 24 forks source link

test if it is undefined against node, not null #43

Open KeenS opened 3 years ago

KeenS commented 3 years ago

fix #39. As you cannot write undefined in JSON, I have no idea to test this patch. @sanjulr do you have any example?

tovbinm commented 3 years ago

I had stumbled upon the same bug and did exactly this fix. Please merge & release.

tovbinm commented 3 years ago

@KeenS I am not sure what are you willing to test here.

!_.isUndefined(null) is a completely useless expression that would always yield true. It's obvious that we are trying to test the condition about node instead.

KeenS commented 3 years ago

I want to test this patch surely fix #39. You're right, this fix is obvious, but writing tests when you submit a patch is a good practice.

srax47 commented 3 years ago

Is there any plans to merge this PR? I'm facing the same issue here.

JounQin commented 3 years ago

ping @cvent