Skip to content

Commit

Permalink
Merge pull request #1289 from girder/harden-preset-load
Browse files Browse the repository at this point in the history
Fix an issue with presets and single frame images
  • Loading branch information
manthey authored Sep 1, 2023
2 parents 3261b5d + 5208ff1 commit 79a8839
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
### Changes
- Internal metadata get endpoint is now public ([#1285](../../pull/1285))

### Bug Fixes
- Fix an issue with presets and single frame images ([#1289](../../pull/1289))

## 1.23.6

### Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ export default {
// prefer the item preset; don't show both
return false;
} else if (
parseInt(preset.frame) >= this.imageMetadata.frames.length ||
parseInt(preset.frame) >= (this.imageMetadata.frames || [null]).length ||
!this.availableModes.includes(preset.mode.id)
) {
return false;
} else if (
preset.style && preset.style.bands &&
this.imageMetadata.IndexRange &&
this.imageMetadata.IndexRange.IndexC &&
preset.style.bands.some((b) => b.framedelta > this.imageMetadata.IndexRange.IndexC)
) {
Expand Down

0 comments on commit 79a8839

Please sign in to comment.