mirror of
https://github.com/hexastack/hexabot
synced 2024-11-23 01:55:15 +00:00
fix(frontend): support one slash case
This commit is contained in:
parent
280cf7ee88
commit
fac05d3721
@ -32,7 +32,12 @@ import { ContentPostbackInput } from "./ContentPostbackInput";
|
||||
import { PostbackInput } from "./PostbackInput";
|
||||
|
||||
const isRegex = (str: Pattern) => {
|
||||
return typeof str === "string" && str.startsWith("/") && str.endsWith("/");
|
||||
return (
|
||||
typeof str === "string" &&
|
||||
str.startsWith("/") &&
|
||||
str.endsWith("/") &&
|
||||
str.length > 1
|
||||
);
|
||||
};
|
||||
const getType = (pattern: Pattern): PatternType => {
|
||||
if (isRegex(pattern)) {
|
||||
|
Loading…
Reference in New Issue
Block a user