Skip to content

Commit

Permalink
fix: blank manuscript bug (#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredgalanis authored Sep 26, 2023
1 parent 75a58e7 commit c047181
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/components/found-manuscripts/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</p>
<p class="text-muted mb-0">
Click the
<i class="fa fa-cloud-download" aria-hidden="true"></i>
<i class="fa fa-cloud-download-alt" aria-hidden="true"></i>
icon or a file name to view and download a file first.
</p>
<p class="text-muted">
Expand Down Expand Up @@ -87,7 +87,7 @@
</div>
<div class="d-flex flex flex-grow-1 ml-sm-4 border-left">
<a href="{{manuscript.url}}" target="_blank" class="px-4 py-2" title="Download this manuscript">
<i class="fa-solid fa-cloud-arrow-down fa-lg"></i>
<i class="fa fa-cloud-download-alt fa-lg"></i>
</a>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion app/components/found-manuscripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c047181

Please sign in to comment.