Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Comments

fix: fix issue with addWebRoute() api extension method#2990

Merged
cwhitten merged 5 commits intomasterfrom
benbrown/fixwebplugins
May 11, 2020
Merged

fix: fix issue with addWebRoute() api extension method#2990
cwhitten merged 5 commits intomasterfrom
benbrown/fixwebplugins

Conversation

@benbrown
Copy link
Contributor

@benbrown benbrown commented May 11, 2020

Description

This fixes a regression introduced a while ago but discovered today by a user that broke the addWebRoute method.

The method needed to be bound back to the Express object to function correctly.

closes #2990

@benbrown benbrown changed the base branch from stable to master May 11, 2020 17:36
@github-actions
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 7e92cda on benbrown/fixwebplugins into f67fcab on master.

Copy link
Contributor

@a-b-r-o-w-n a-b-r-o-w-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on the requirement for this change? I'd just like to understand what was breaking.

…egistration.ts

Co-authored-by: Andy Brown <asbrown002@gmail.com>
@benbrown
Copy link
Contributor Author

benbrown commented May 11, 2020

It was throwing an exception because Express wasn't bound to the method anymore, so it was unable to find certain internal methods.

Without this, using the addWebAPI method throws this error:

TypeError: Cannot read property 'lazyrouter' of undefined

This turns out to be the source problem:
expressjs/express#3855

@benbrown benbrown requested a review from a-b-r-o-w-n May 11, 2020 20:12
@cwhitten cwhitten merged commit 3ac5786 into master May 11, 2020
@cwhitten cwhitten deleted the benbrown/fixwebplugins branch May 11, 2020 22:42
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* Fix regression that breaks the api.addWebRoute method

* Update Composer/packages/extensions/plugin-loader/src/composerPluginRegistration.ts

Co-authored-by: Andy Brown <asbrown002@gmail.com>

Co-authored-by: Andy Brown <asbrown002@gmail.com>
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants