diff --git a/src/extensions/lens-extension.ts b/src/extensions/lens-extension.ts index ff8758c384..6c768e65a4 100644 --- a/src/extensions/lens-extension.ts +++ b/src/extensions/lens-extension.ts @@ -53,13 +53,13 @@ export class LensExtension { onProtocolRequest(pathSchema: string, handler: RouteHandler): void { const lpr = LensProtocolRouter.getInstance(); - lpr.extensionOn(this.id, pathSchema, handler); + lpr.extensionOn(this.name, pathSchema, handler); } removeProtocolHandlers(): void { const lpr = LensProtocolRouter.getInstance(); - lpr.removeExtensionHandlers(this.id); + lpr.removeExtensionHandlers(this.name); } get description() { diff --git a/src/main/protocol-handler/router.ts b/src/main/protocol-handler/router.ts index 01732b08e0..33c63fbef0 100644 --- a/src/main/protocol-handler/router.ts +++ b/src/main/protocol-handler/router.ts @@ -161,6 +161,7 @@ export class LensProtocolRouter extends Singleton { const [match, handler] = route; delete match.params[EXTENSION_NAME_MATCH]; + delete match.params[EXTENSION_PUBLISHER_MATCH]; handler({ pathname: match.params, search: url.query, @@ -169,10 +170,12 @@ export class LensProtocolRouter extends Singleton { public on(urlSchema: string, handler: RouteHandler): void { pathToRegexp(urlSchema); // verify now that the schema is valid + logger.info(`${LensProtocolRouter.LoggingPrefix}: internal registering ${urlSchema}`); this.internalRoutes.set(urlSchema, handler); } public extensionOn(id: ExtensionId, urlSchema: string, handler: RouteHandler): void { + logger.info(`${LensProtocolRouter.LoggingPrefix}: extension ${id} registering ${urlSchema}`); pathToRegexp(urlSchema); // verify now that the schema is valid if (!this.extentionRoutes.has(id)) {