Preserve the protocol in Author Image

Closes #2942
pull/2967/head
Bogdan 8 months ago
parent eae06695e8
commit e28becdda4

@ -7,13 +7,10 @@ function findImage(images, coverType) {
}
function getUrl(image, coverType, size) {
if (image) {
// Remove protocol
let url = image.url;
const imageUrl = image?.url;
url = url.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
return url;
if (imageUrl) {
return imageUrl.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
}
}

@ -95,6 +95,7 @@
"@babel/preset-react": "7.22.5",
"@babel/preset-typescript": "7.22.11",
"@types/lodash": "4.14.197",
"@types/react-lazyload": "3.2.1",
"@types/redux-actions": "2.6.2",
"@typescript-eslint/eslint-plugin": "6.5.0",
"@typescript-eslint/parser": "6.5.0",

@ -1483,6 +1483,13 @@
dependencies:
"@types/react" "*"
"@types/react-lazyload@3.2.1":
version "3.2.1"
resolved "https://registry.yarnpkg.com/@types/react-lazyload/-/react-lazyload-3.2.1.tgz#6c4a015ca6770333c87295d31c32c17454fda922"
integrity sha512-LeJMJVTEGxcOLy9OFErOqNXIo506pxxDA/zgpTy8Bub508c1OS1Br4+b6jnhsOQQl4IwPPAnEDMqCnBJ9jauUw==
dependencies:
"@types/react" "*"
"@types/react-redux@^7.1.16":
version "7.1.26"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.26.tgz#84149f5614e40274bb70fcbe8f7cae6267d548b1"

Loading…
Cancel
Save