From 26a45a63b3f318023e7937fce90883f882b83f17 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Wed, 13 Jul 2022 18:28:04 +0900
Subject: [PATCH] chore(client): fix routing

cherry-picked from c771135fd852a972a775abe6b1a5e4199cc5191b
---
 packages/client/src/nirax.ts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/client/src/nirax.ts b/packages/client/src/nirax.ts
index 411d2366c..9bcc5b683 100644
--- a/packages/client/src/nirax.ts
+++ b/packages/client/src/nirax.ts
@@ -127,7 +127,9 @@ export class Router extends EventEmitter<{
 							props.set(p.name, safeURIDecode(parts[0].substring(p.startsWith.length)));
 							parts.shift();
 						} else {
-							props.set(p.name, safeURIDecode(parts[0]));
+							if (parts[0]) {
+								props.set(p.name, safeURIDecode(parts[0]));
+							}
 							parts.shift();
 						}
 					}