neuroanatomy / BrainBox

BrainBox is a web application that lets you annotate and segment 3D brain imaging data in real time, collaboratively.
https://brainbox.pasteur.fr
Other
96 stars 46 forks source link

Ensure projects are not null in hasAccesstoFileIfAllowedBySomeProjects #347

Closed dhovart closed 2 years ago

dhovart commented 2 years ago

I realized this was in my stash and that it should have made it in #344

codecov-commenter commented 2 years ago

Codecov Report

Merging #347 (5b18270) into master (749ff85) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #347   +/-   ##
=======================================
  Coverage   63.39%   63.39%           
=======================================
  Files          16       16           
  Lines        2306     2306           
=======================================
  Hits         1462     1462           
  Misses        844      844           
Flag Coverage Δ
integration 53.90% <ø> (ø)
unittests 45.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 749ff85...5b18270. Read the comment docs.

ntraut commented 2 years ago

ok for me, even if I would rather use plain js than loadash it could be project instanceof Object (https://youmightnotneed.com/lodash#isObject) or if the only problem which can occur is that project is undefined, I would use the optional chaining project?.files.list anyway this doesn't control for all the bad values that project can have, it would work if project is a string for example but not if project is an empty object