Skip to content

Commit 17b61ad

Browse files
authored
Merge pull request #244 from effigies/fix/web-failure
fix: Do not crash on missing datasetTypes option
2 parents 27373e0 + c558ff8 commit 17b61ad

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--
2+
A new scriv changelog fragment.
3+
4+
Uncomment the section that is right (remove the HTML comment wrapper).
5+
For top level release notes, leave all the headers commented out.
6+
-->
7+
8+
<!--
9+
### Added
10+
11+
- A bullet item for the Added category.
12+
13+
-->
14+
<!--
15+
### Changed
16+
17+
- A bullet item for the Changed category.
18+
19+
-->
20+
### Fixed
21+
22+
- A crash in the web validator prevented validation from taking place.
23+
24+
<!--
25+
### Deprecated
26+
27+
- A bullet item for the Deprecated category.
28+
29+
-->
30+
<!--
31+
### Removed
32+
33+
- A bullet item for the Removed category.
34+
35+
-->
36+
<!--
37+
### Security
38+
39+
- A bullet item for the Security category.
40+
41+
-->
42+
<!--
43+
### Infrastructure
44+
45+
- A bullet item for the Infrastructure category.
46+
47+
-->

src/validators/bids.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function validate(
7373
}
7474

7575
// Empty list defaults to allow all
76-
if (options.datasetTypes.length) {
76+
if (options.datasetTypes?.length) {
7777
const datasetType = (dsContext.dataset_description.DatasetType ?? 'raw') as string
7878
if (!options.datasetTypes.includes(datasetType)) {
7979
dsContext.issues.add({

0 commit comments

Comments
 (0)