Skip to content

Commit

Permalink
refactor: omit pp_debug when missing (paypal#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinstardust authored and jadutter committed Oct 12, 2021
1 parent 8db8e83 commit f00c423
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/zoid/message/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ export default createGlobalVariableGetter('__paypal_credit_message__', () =>
debug: {
type: 'boolean',
queryParam: 'pp_debug',
value: () => /(\?|&)pp_debug=true(&|$)/.test(window.location.search)
required: false,
value: () => (/(\?|&)pp_debug=true(&|$)/.test(window.location.search) ? true : undefined)
},
messageLocation: {
type: 'string',
Expand Down
3 changes: 2 additions & 1 deletion src/zoid/modal/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ export default createGlobalVariableGetter('__paypal_credit_modal__', () =>
debug: {
type: 'boolean',
queryParam: 'pp_debug',
value: () => /(\?|&)pp_debug=true(&|$)/.test(window.location.search)
required: false,
value: () => (/(\?|&)pp_debug=true(&|$)/.test(window.location.search) ? true : undefined)
},
stageTag: {
type: 'string',
Expand Down

0 comments on commit f00c423

Please sign in to comment.