mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-12-26 00:49:10 +00:00
fix updateReviewToStorage bug with capitalized tag handling,
remove unnecessary overflow-wrap in ReviewCard.js Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
89dfe3293d
commit
dbbd14399e
@ -16,7 +16,6 @@ class ReviewCard extends HTMLElement {
|
|||||||
font-family: Century Gothic;
|
font-family: Century Gothic;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow-wrap: anywhere;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ export function updateReviewToStorage(ID, review){
|
|||||||
let repeatedTags = review["tags"].filter(x => oldReview["tags"].includes(x));
|
let repeatedTags = review["tags"].filter(x => oldReview["tags"].includes(x));
|
||||||
let tagArr = [];
|
let tagArr = [];
|
||||||
for (let i in repeatedTags){
|
for (let i in repeatedTags){
|
||||||
tagArr = JSON.parse(localStorage.getItem(`!${repeatedTags[i]}`));
|
tagArr = JSON.parse(localStorage.getItem(`!${repeatedTags[i]}`.toLocaleLowerCase()));
|
||||||
if(tagArr.length == 1){
|
if(tagArr.length == 1){
|
||||||
for (let j in tagArr){
|
for (let j in tagArr){
|
||||||
if(tagArr[j] == ID){
|
if(tagArr[j] == ID){
|
||||||
|
Loading…
Reference in New Issue
Block a user