Better code fix for preview

being more specific on the validation for the unresolvable relative path.
checking now if the path start with "file:///~" instead of only: "file:/"
This was too much restrictive since those direct path works and wouldn't return a preview:
Ex: "file://MYSERVER/folder/100_0057.jpg"
This commit is contained in:
Alezia Kurdis 2020-08-17 21:58:42 -04:00 committed by GitHub
parent d31f161d88
commit 8d217d215f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2890,7 +2890,7 @@ function createTextureProperty(property, elProperty) {
let imageLoad = function(url) {
elDiv.style.display = null;
if (url.slice(0, 5).toLowerCase() === "atp:/" || url.slice(0, 6).toLowerCase() === "file:/") {
if (url.slice(0, 5).toLowerCase() === "atp:/" || url.slice(0, 9).toLowerCase() === "file:///~") {
elImage.src = "";
elImage.style.display = "none";
elDiv.classList.remove("with-texture");