fix build

This commit is contained in:
hzrd149 2023-10-29 18:52:31 -05:00
parent cc4247dc88
commit c38c08df7e

View File

@ -5,10 +5,10 @@ import { renderOpenGraphUrl } from "./common";
// copied from https://github.com/SimonBrazell/privacy-redirect/blob/master/src/assets/javascripts/helpers/twitter.js
export const TWITTER_DOMAINS = ["twitter.com", "www.twitter.com", "mobile.twitter.com", "pbs.twimg.com"];
export function renderTwitterUrl(match: URL) {
export function renderTwitterUrl(match: URL, isLineEnd: boolean) {
if (!TWITTER_DOMAINS.includes(match.hostname)) return null;
const { twitterRedirect } = appSettings.value;
if (twitterRedirect) return renderOpenGraphUrl(replaceDomain(match, twitterRedirect));
else return renderOpenGraphUrl(match);
if (twitterRedirect) return renderOpenGraphUrl(replaceDomain(match, twitterRedirect), isLineEnd);
else return renderOpenGraphUrl(match, isLineEnd);
}