From 804feb4724e86bb1e04bff85e4e946325b0eb56c Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:05:43 -0500 Subject: [PATCH] waring for unintended behaviour it doesn't actually match when there is no / at the end. --- js/redirect.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/redirect.js b/js/redirect.js index a45e833..f1c640c 100644 --- a/js/redirect.js +++ b/js/redirect.js @@ -152,6 +152,11 @@ Redirect.prototype = { return; } + if (!this.patternType == Redirect.REGEX && !this.includePattern.includes('.') && this.includePattern.slice(-1)!='/') { + this.error = 'Warning: this will not redirect properly.'; + return; + } + this.compile(); var match = this.getMatch(this.exampleUrl, true);