hapijs / hoek

Node utilities shared among the extended hapi universe
Other
480 stars 171 forks source link

Fix empty ref bug in contain when only is true #324

Closed samliebow closed 5 years ago

samliebow commented 5 years ago

This fixes #323.

I added in some special logic for strings so that contain('', '') is still true and contain('', ['', '']) is true with any combo of flags as long as options.once is false. The latter is a change to the current behavior (contain('', ['', '']) is currently false), but I believe the current behavior there is also a bug.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.