-
Notifications
You must be signed in to change notification settings - Fork 388
Fix issue where toolbox successResponses is stripped #265
Conversation
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.
|
Signed CLA |
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
CLAs look good, thanks! |
There was a problem hiding this 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!
lib/sw-precache.js
Outdated
@@ -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) { |
There was a problem hiding this comment.
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 RegExp
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. fixed.
Thanks, @mahwy! |
Fixed a bug wth successResponses similar to #228