소스 검색

Bugfix lower case for comparison

Carsten Porth 5 년 전
부모
커밋
95edc15cd6
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      app/src/components/tweet-body/tweet-body.ts

+ 3 - 2
app/src/components/tweet-body/tweet-body.ts

@@ -131,7 +131,8 @@ export class TweetBodyComponent {
     const res = [];
     mentions.forEach(element => {
       const apiEntity = this.entities.user_mentions.filter(
-        el => el.screen_name === element["screenName"]
+        el =>
+          el.screen_name.toLowerCase() === element["screenName"].toLowerCase()
       )[0];
       res.push({
         start: element.indices[0],
@@ -148,7 +149,7 @@ export class TweetBodyComponent {
     const res = [];
     urls.forEach(element => {
       const apiEntity = this.entities.urls.filter(
-        el => el.url === element["url"]
+        el => el.url.toLowerCase() === element["url"].toLowerCase()
       )[0];
       res.push({
         start: element.indices[0],