sqlectron / sqlectron-core

https://sqlectron.github.io/
MIT License
221 stars 69 forks source link

Fix clientValidator not properly ensuring valid client #92

Closed MasterOdin closed 4 years ago

MasterOdin commented 4 years ago

The bitwise operator here messes up the boolean return of .some and causes this check to then always trivially pass.

example:

> !~[1,2].some(v => v === 1);
false
> !~[1,2].some(v => v === 3);
false

Given that .some returns a boolean, we can safely remove the bitwise operator, and get things working as we would expect.