Skip to content

Commit

Permalink
Fix: e.data.userPdf가 false여도 조건문에 들어오도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
coddingyun committed Oct 26, 2023
1 parent 20645ae commit 3d4a4a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const receiveBasicInfo = async(e) => {
if (e.data.refresh) {
setCookie('refresh', e.data.refresh)
}
if (e.data.paperId && e.data.paperItems && e.data.userPdf) {
if (e.data.paperId && e.data.paperItems) {
sessionStorage.setItem('paperId', e.data.paperId)
const paperItemsWithTag = e.data.paperItems.map((paper) => {
const changeItem = {
Expand All @@ -54,9 +54,10 @@ const receiveBasicInfo = async(e) => {
sessionStorage.setItem('paperItemsWithTag', JSON.stringify(paperItemsWithTag))
if (window._reader) {
let res;
if (userPdf) {
res = await fetch(`https://browse.arxiv.org/pdf/${e.data.paperId}.pdf`);
if (e.data.userPdf) {
res = await fetch(`https://yeondoo-upload-pdf.s3.ap-northeast-2.amazonaws.com/${e.data.paperId}.pdf`);
} else {
console.log('check')
res = await fetch(`https://browse.arxiv.org/pdf/${e.data.paperId}.pdf`);
}
const newData = {
Expand Down

0 comments on commit 3d4a4a3

Please sign in to comment.