multiparty / jiff

JavaScript library for building web-based applications that employ secure multi-party computation (MPC).
https://multiparty.org/jiff/
MIT License
253 stars 52 forks source link

fix an issue with ref comparison instead of value #256

Closed AbhinavMir closed 8 months ago

AbhinavMir commented 8 months ago

Mostly pointed out by linter, but "This condition will always return 'false' since JavaScript compares objects by reference, not value". Added in a quick fix with parties.length === 0 - since the value and types both can correctly be compared as opposed to parties === [] where types are (likely) different thus a forever-false situation.