Skip to content

Commit

Permalink
Merge pull request #173 from DANS-KNAW/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ddzyne authored Aug 5, 2024
2 parents cfb644b + 00d0df8 commit 9536f19
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/4tu/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion apps/cat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion apps/ohsmart/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</html>
3 changes: 1 addition & 2 deletions apps/rda/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

</html>
2 changes: 1 addition & 1 deletion apps/swh/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</html>
12 changes: 2 additions & 10 deletions packages/deposit/src/features/files/filesHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,8 @@ export function validateFileType(headerString: string) {

export function findFileGroup(
ext?: string,
data?: GroupedDataObject[],
data?: GroupedDataObject,
): string | null {
if (!ext || !data) return null;

for (const obj of data) {
for (const key in obj) {
if (obj[key].includes(ext)) {
return key;
}
}
}
return null; // Return null if ext is not found in any key
return Object.keys(data).find((key: string) => data[key].includes(ext)) || null;
}
2 changes: 1 addition & 1 deletion packages/deposit/src/types/Files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface GroupedDataObject {
}

export interface DansGroupedList {
type: GroupedDataObject[];
type: GroupedDataObject;
}

export interface DansSimpleListQueryResponse {
Expand Down

0 comments on commit 9536f19

Please sign in to comment.