From c047181d9178982b8eeff5d6e941dd9d37467ccc Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Tue, 26 Sep 2023 11:55:46 -0400 Subject: [PATCH] fix: blank manuscript bug (#1216) Closes: https://github.com/eclipse-pass/main/issues/708 --- app/components/found-manuscripts/index.hbs | 4 ++-- app/components/found-manuscripts/index.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/components/found-manuscripts/index.hbs b/app/components/found-manuscripts/index.hbs index e7dd41be..548572a9 100644 --- a/app/components/found-manuscripts/index.hbs +++ b/app/components/found-manuscripts/index.hbs @@ -20,7 +20,7 @@

Click the - + icon or a file name to view and download a file first.

@@ -87,7 +87,7 @@

- +
diff --git a/app/components/found-manuscripts/index.js b/app/components/found-manuscripts/index.js index e696f06b..fefbf132 100644 --- a/app/components/found-manuscripts/index.js +++ b/app/components/found-manuscripts/index.js @@ -29,7 +29,11 @@ export default class FoundManuscriptsComponent extends Component { const allFileNames = [...newFiles.toArray(), ...prevFiles.toArray()].map((file) => file.name); - return this.foundManuscripts.filter((foundMs) => !allFileNames.includes(foundMs.name)); + return this.foundManuscripts + .filter((manuscript) => !allFileNames.includes(manuscript.name)) + .filter((manuscript) => { + return !!manuscript.name && !!manuscript.url; + }); } @task