Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Fix issue where toolbox successResponses is stripped #265

Merged
merged 3 commits into from
Mar 22, 2017
Merged

Fix issue where toolbox successResponses is stripped #265

merged 3 commits into from
Mar 22, 2017

Conversation

mahwy
Copy link
Contributor

@mahwy mahwy commented Mar 17, 2017

Fixed a bug wth successResponses similar to #228

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@mahwy
Copy link
Contributor Author

mahwy commented Mar 17, 2017

Signed CLA

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

Fixed a bug wth successResponses similar to #228
@googlebot
Copy link

CLAs look good, thanks!

Copy link
Contributor

@jeffposnick jeffposnick left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@@ -116,6 +116,9 @@ function stringifyToolboxOptions(options) {
var str = JSON.stringify(options);
if (options.origin instanceof RegExp) {
str = str.replace(/("origin":)\{\}/, '$1' + options.origin);
} else if (options.successResponses instanceof RegExp) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be just a standalone if (...) rather than an else if (...), since someone might set both options.origin and options.successResponses to RegExps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. fixed.

@jeffposnick
Copy link
Contributor

Thanks, @mahwy!

@jeffposnick jeffposnick merged commit ac7da0e into GoogleChromeLabs:master Mar 22, 2017
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