From 0abbc9789ebcd30e43acf51052d03491e82aa007 Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 12 Feb 2021 15:19:26 -0600 Subject: [PATCH] Allow plugins to register at the root Unfortunately we have existing plugins with routes there which we cannot move. --- src/node/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/plugin.ts b/src/node/plugin.ts index 7b65b6b5f..37700e183 100644 --- a/src/node/plugin.ts +++ b/src/node/plugin.ts @@ -251,7 +251,7 @@ export class PluginAPI { if (!p.routerPath) { throw new Error("plugin missing router path") } - if (!p.routerPath.startsWith("/") || p.routerPath.length < 2) { + if (!p.routerPath.startsWith("/")) { throw new Error(`plugin router path ${q(p.routerPath)}: invalid`) } if (!p.homepageURL) {