Preserve the protocol in Movie Image

(cherry picked from commit a2f16bddfd7dfba207c5feaaf472913c38dc3e25)

Closes #9198
pull/9199/head
Bogdan 8 months ago
parent 4e01fa57fd
commit fe7203815d

@ -10,11 +10,7 @@ function getUrl(image, coverType, size) {
const imageUrl = image?.url ?? image?.remoteUrl;
if (imageUrl) {
// Remove protocol
let url = imageUrl.replace(/^https?:/, '');
url = url.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
return url;
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.195",
"@types/react-lazyload": "3.2.0",
"@types/react-router-dom": "5.3.3",
"@types/react-text-truncate": "0.14.1",
"@types/react-window": "1.8.5",

@ -1436,6 +1436,13 @@
dependencies:
"@types/react" "*"
"@types/react-lazyload@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@types/react-lazyload/-/react-lazyload-3.2.0.tgz#b763f8f0c724df2c969d7e0b3a56c6aa2720fa1f"
integrity sha512-4+r+z8Cf7L/mgxA1vl5uHx5GS/8gY2jqq2p5r5WCm+nUsg9KilwQ+8uaJA3EUlLj57AOzOfGGwwRJ5LOVl8fwA==
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