ome / ome-ngff-validator

Web page for validating OME-NGFF files
https://ome.github.io/ome-ngff-validator
BSD 2-Clause "Simplified" License
4 stars 3 forks source link

Fix rendering of list with false-like first item #15

Closed will-moore closed 1 year ago

will-moore commented 1 year ago

Previously I was incorrectly using if contents[0] to check if contents was a list. This returns False if the first item in the list is False.

See https://ome.github.io/ome-ngff-validator/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0101A/13457539.zarr where the translation list is rendered instead as a dict.

Screenshot 2022-10-20 at 14 34 04

Fixed by using Array.isArray(): deployed at https://deploy-preview-15--ome-ngff-validator.netlify.app/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0101A/13457539.zarr

Screenshot 2022-10-20 at 14 33 37

Also tweaked the indent of list items.

netlify[bot] commented 1 year ago

Deploy Preview for ome-ngff-validator ready!

Name Link
Latest commit d4a61e148d8009665f7555c3abcb84b40478cac0
Latest deploy log https://app.netlify.com/sites/ome-ngff-validator/deploys/63514f8290c3b60008285b73
Deploy Preview https://deploy-preview-15--ome-ngff-validator.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.