diff --git a/frontend/elements/photo-lightbox.html b/frontend/elements/photo-lightbox.html
index 6d7ca9e..db27c0a 100644
--- a/frontend/elements/photo-lightbox.html
+++ b/frontend/elements/photo-lightbox.html
@@ -355,15 +355,10 @@ Polymer({
attached: function() {
var base = document.querySelector("base");
if (base) {
- base = new URL(base.href).pathname.replace(/\/$/, ""); /* Remove trailing slash if there */
+ this.base = new URL(base.href).pathname.replace(/\/$/, "") + "/"; /* Make sure there is a trailing slash */
} else {
- base = "";
+ this.base = "/";
}
- /* If base is configured, add a trailing slash */
- if (base.length) {
- base += "/";
- }
- this.base = base;
}
});
diff --git a/frontend/elements/photo-thumbnail.html b/frontend/elements/photo-thumbnail.html
index e4b8520..39f9a8c 100755
--- a/frontend/elements/photo-thumbnail.html
+++ b/frontend/elements/photo-thumbnail.html
@@ -188,7 +188,7 @@
attached: function() {
var base = document.querySelector("base");
if (base) {
- this.base = new URL(base.href).pathname.replace(/\/$/, "") + "/"; /* Ensure trailing slash */
+ this.base = new URL(base.href).pathname.replace(/\/$/, "") + "/"; /* Make sure there is a trailing slash */
} else {
this.base = "/";
}