Fix double handler bug.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti committed 2020-12-10 15:23:33 +02:00
1 parent 71793b0797
commit b7e4aa38cb
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ export class LensProtocolRouter extends Singleton {
public init() {
subscribeToBroadcast(lensProtocolChannel, ((_event, { rawUrl }) => {
console.log(`receiving: ${rawUrl}`);
logger.info(`receiving: ${rawUrl}`);
try {
this.route(Url(rawUrl, true));
+4
View File
@@ -41,6 +41,9 @@ export async function bootstrap(App: AppComponent) {
extensionDiscovery.init();
const lensProtocolRouter = LensProtocolRouter.getInstance<LensProtocolRouter>();
logger.info(`[PROTOCOL ROUTER] Calling lensProtocolRouter.init()`);
if (process.isMainFrame) {
lensProtocolRouter.init();
lensProtocolRouter.onMissingExtension(async name => {
if (!extensionLoader.isInstalled(name)) {
@@ -58,6 +61,7 @@ export async function bootstrap(App: AppComponent) {
}
});
protocolEndpoints.registerHandlers();
}
// preload common stores
await Promise.all([