1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00

Apply prettier formatting

This commit is contained in:
Michael Weimann
2022-12-09 09:38:20 +01:00
parent 08a9073bd5
commit 349c2c2587
239 changed files with 22004 additions and 21928 deletions

View File

@@ -39,13 +39,13 @@ export function getHttpUriForMxc(
allowDirectLinks = false,
): string {
if (typeof mxc !== "string" || !mxc) {
return '';
return "";
}
if (mxc.indexOf("mxc://") !== 0) {
if (allowDirectLinks) {
return mxc;
} else {
return '';
return "";
}
}
let serverAndMediaId = mxc.slice(6); // strips mxc://
@@ -74,6 +74,6 @@ export function getHttpUriForMxc(
serverAndMediaId = serverAndMediaId.slice(0, fragmentOffset);
}
const urlParams = (Object.keys(params).length === 0 ? "" : ("?" + utils.encodeParams(params)));
const urlParams = Object.keys(params).length === 0 ? "" : "?" + utils.encodeParams(params);
return baseUrl + prefix + serverAndMediaId + urlParams + fragment;
}