Skip to content

Commit 0d20b15

Browse files
committed
Split using a string
1 parent 341f873 commit 0d20b15

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ export function $match<P extends ParamData>(
506506
const decoders = re.keys.map((key) => {
507507
if (decode && (key.modifier === "+" || key.modifier === "*")) {
508508
const { prefix = "", suffix = "", separator = suffix + prefix } = key;
509-
const re = new RegExp(escape(separator), "g");
510-
return (value: string) => value.split(re).map(decode);
509+
return (value: string) => value.split(separator).map(decode);
511510
}
512511

513512
return decode || NOOP_VALUE;

0 commit comments

Comments
 (0)