From 3496b0b319eedcb2636ee249569e0d03db463c6f Mon Sep 17 00:00:00 2001 From: laurentheirendt <laurent.heirendt@uni.lu> Date: Mon, 28 Oct 2019 17:56:15 +0100 Subject: [PATCH] exception if sub empty --- .ci/.autoRedirect | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.ci/.autoRedirect b/.ci/.autoRedirect index d18e26b4..e210fe69 100644 --- a/.ci/.autoRedirect +++ b/.ci/.autoRedirect @@ -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> -- GitLab