Allow plugins to register at the root

Unfortunately we have existing plugins with routes there which we cannot
move.
This commit is contained in:
Asher 2021-02-12 15:19:26 -06:00
parent 619934dc29
commit 0abbc9789e
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -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) {