Verified Commit 3496b0b3 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

exception if sub empty

parent 041c63ee
......@@ -27,10 +27,12 @@
if(status === 200){
// internal pages
window.location.href = 'https://r3-core.pages.uni.lu/howto-cards-internal/stable/internal/'+sub;
if (sub.length > 0) { sub = 'internal/'+sub; }
window.location.href = 'https://r3-core.pages.uni.lu/howto-cards-internal/stable/'+sub;
} else {
// external pages
window.location.href = 'https://r3.pages.uni.lu/howto-cards/stable/external/'+sub;
if (sub.length > 0) { sub = 'external/'+sub; }
window.location.href = 'https://r3.pages.uni.lu/howto-cards/stable/'+sub;
}
});
</script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment