From c7492fe0f1589e7beddda6ceb9a87ad0c736d768 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Tue, 15 Feb 2022 12:17:44 -0700 Subject: [PATCH] wrap registration block to catch error (#2299) * wrap registration block to catch error * check for function existance rather than error Co-authored-by: Mattermod --- mattermost-plugin/webapp/src/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mattermost-plugin/webapp/src/index.tsx b/mattermost-plugin/webapp/src/index.tsx index 28735de61..599844fc8 100644 --- a/mattermost-plugin/webapp/src/index.tsx +++ b/mattermost-plugin/webapp/src/index.tsx @@ -148,7 +148,10 @@ export default class Plugin { UserSettings.lastViewId = null window.open(`${windowAny.frontendBaseURL}/workspace/${currentChannel}`, '_blank', 'noopener') } - this.channelHeaderButtonId = registry.registerChannelIntroButtonAction(, goToFocalboardTemplate, 'Boards') + + if (registry.registerChannelIntroButtonAction) { + this.channelHeaderButtonId = registry.registerChannelIntroButtonAction(, goToFocalboardTemplate, 'Boards') + } this.registry.registerProduct('/boards', 'product-boards', 'Boards', '/boards/welcome', MainApp, HeaderComponent) this.registry.registerPostWillRenderEmbedComponent((embed) => embed.type === 'boards', BoardsUnfurl, false)