Skip to content

Commit

Permalink
fix:autoRegister default
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoyafng committed Mar 12, 2024
1 parent a2ce419 commit e35c6f0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/vue-ui-components/src/Guard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
</template>

<script>
import { Guard as NativeGuard, GuardEventsCamelToKebabMapping } from '@authing/native-js-ui-components'
import {
Guard as NativeGuard,
GuardEventsCamelToKebabMapping
} from '@authing/native-js-ui-components'
const callbackEvent = ['before-login', 'before-register']
Expand Down Expand Up @@ -36,7 +39,7 @@ export default {
},
autoRegister: {
type: Boolean,
default:false, // https://github.com/storybookjs/storybook/issues/11839
default: undefined, // https://github.com/storybookjs/storybook/issues/11839
required: false
},
isSSO: {
Expand Down Expand Up @@ -120,7 +123,9 @@ export default {
const evts = Object.values(GuardEventsCamelToKebabMapping)
const kebabToCamelMap = Object.entries(GuardEventsCamelToKebabMapping).reduce((acc, [camel, kebab]) => {
const kebabToCamelMap = Object.entries(
GuardEventsCamelToKebabMapping
).reduce((acc, [camel, kebab]) => {
return Object.assign({}, acc, {
[kebab]: camel
})
Expand All @@ -146,7 +151,7 @@ export default {
})
}, {})
evts.forEach((evtName) => this.guardInstance.on(evtName, listeners[evtName]))
evts.forEach(evtName => this.guardInstance.on(evtName, listeners[evtName]))
if (this.localVisible) {
this.guardInstance.show()
Expand Down

0 comments on commit e35c6f0

Please sign in to comment.