fix: absolute path for b64 images on 404 page (#8)

This commit is contained in:
Victor Westerlund 2024-04-06 22:49:10 +00:00 committed by GitHub
parent efa84d9e6c
commit 397484c5b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,12 +17,8 @@ class Generator {
get dir () { return this._dir; },
set dir (newPath) {
const url = new URL(newPath);
// Replace pathname of this file with relative path to assets
const path = url.pathname.split("/");
path[path.length - 1] = this._dir_rel;
url.pathname = path.join("/");
url.pathname = this._dir_rel;
this._dir = url.toString();
}
}