Skip to content

Commit

Permalink
Merge pull request #1494 from woowacourse/hotfix/og-tag-npe-fix
Browse files Browse the repository at this point in the history
Hotfix: og 태그가 없는 경우 null 을 반환하여 생기는 NPE 해결을 위해 빈문자열 반환
  • Loading branch information
splitCoding authored Aug 7, 2023
2 parents d085e03 + ef48829 commit 56605dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private static String getContent(final OgType type, final Document document) {
final Element element = document.selectFirst(String.format(FORMAT, type.metaTag));
return Optional.ofNullable(element)
.map(it -> it.attr("content"))
.orElse(null);
.orElse("");
}
}

Expand Down

0 comments on commit 56605dd

Please sign in to comment.