Skip to content

Commit

Permalink
fix: dataSize default overriding actual config (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmurraydavid authored Mar 21, 2021
1 parent 04f4273 commit a25daf7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/recaptcha.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
:data-sitekey="siteKey || $recaptcha.siteKey"
:data-size="dataSize || $recaptcha.size"
:data-size="computedDataSize"
:data-theme="dataTheme"
:data-badge="dataBadge"
:data-tabindex="dataTabindex"
Expand Down Expand Up @@ -31,7 +31,7 @@ export default {
},
dataSize: {
default: 'normal',
default: null,
type: String,
validator: (value) => {
Expand Down Expand Up @@ -65,6 +65,12 @@ export default {
this.$recaptcha.on('recaptcha-expired', this.onExpired)
},
computed: {
computedDataSize() {
return (this.dataSize || this.$recaptcha.size) || 'normal'
}
},
methods: {
onError(message) {
return this.$emit('error', message)
Expand Down

0 comments on commit a25daf7

Please sign in to comment.