techfort / LokiJS

javascript embeddable / in-memory database
http:/techfort.github.io/LokiJS
MIT License
6.71k stars 478 forks source link

added missing null check to dot sub scan fixes #891 #896

Closed blaky closed 2 years ago

blaky commented 2 years ago

When a filter was deep dot filter is applied on null value, the code throws an exception. This is due to a missing null check. typeof null is always object which is a questionable part of JavaScript and leads to bugs like this...

blaky commented 2 years ago

Hi @techfort , Could you please check this PR and let me know if there is anything else we can do to get it merged. Thanks!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

techfort commented 2 years ago

Damn gotta review this, sorry for the delay

On Sun 9 Jan 2022, 00:32 stale[bot], @.***> wrote:

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

— Reply to this email directly, view it on GitHub https://github.com/techfort/LokiJS/pull/896#issuecomment-1008197197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7QK7IU3J2I2MADHYY6IO3UVDJSBANCNFSM5E74EHCA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

bastiion commented 2 years ago

@techfort it is a very simple fix (in only one line of code + test case), could you please merge this PR ? tx

blaky commented 2 years ago

@techfort Any chance that you review this in the foreseeable future?

blaky commented 2 years ago

@techfort Thank you! :-)