-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Changes The constructor of line-bot-sdk-nodejs client modifies the given config, which should ideally behave immutably. Reusing the config as is can lead to unexpected behavior(see below sample `#2`). This change ensures that the config is not unintentionally overwritten. ## How to reproduce this (normal) ```ts // #1 (it works, but `config`'s baseURL is updated expectedly) const config = { channelAccessToken: "token-token", }; const blobClient = new messagingApi.MessagingApiBlobClient(config); // config.baseURL -> https://api-data.line.me (Unexpected, but it works) ``` (this issue) Executing the following code does not set `api.line-data.me`. A workaround is to clone the config, but this is not convenient and debugging can be troublesome. ```ts // #2 (blob doesn't work, because the first unexpected update blocks blob client uses expected baseURL) const config = { channelAccessToken: "token-token", }; const client = new messagingApi.MessagingApiClient(config); // config.baseURL -> https://api.line.me const blobClient = new messagingApi.MessagingApiBlobClient(config); // config.baseURL -> https://api.line.me, not https://api-data.line.me (Unexpected, and it won't work) ```
- Loading branch information
Showing
12 changed files
with
34 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters