Skip to content

Commit

Permalink
Merge pull request #1600 from UNC-Libraries/bxc-4011-int
Browse files Browse the repository at this point in the history
Parse dimensions as ints so that comparisons will be done numerically…
  • Loading branch information
sharonluong committed Jul 28, 2023
2 parents 1869e50 + 486f188 commit 0ebd72a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions static/js/vue-cdr-access/src/mixins/fileDownloadUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default {

getOriginalFile(brief_object) {
const original_file = brief_object.datastream.find(file => file.startsWith('original_file'));
console.log(original_file)
if (original_file === undefined) {
return undefined;
}
Expand All @@ -21,7 +20,7 @@ export default {

largestImageEdge(brief_object) {
const file_info = this.getOriginalFile(brief_object).split('|');
const edge_sizes = file_info[file_info.length - 1].split('x');
const edge_sizes = file_info[file_info.length - 1].split('x').map(x => parseInt(x));
return edge_sizes[0] > edge_sizes[1] ? edge_sizes[0] : edge_sizes[1];
},

Expand Down

0 comments on commit 0ebd72a

Please sign in to comment.