修复keys报错
This commit is contained in:
parent
a1646763b6
commit
8367b622f7
@ -109,8 +109,8 @@ export default {
|
||||
this.isHasKey = true
|
||||
}
|
||||
|
||||
const {keys} = keyPage
|
||||
this.isHasKey = keys.indexOf(sessionStorage.getItem('key')) > -1
|
||||
const keys = keyPage.keys
|
||||
this.isHasKey = keys && keys.indexOf(sessionStorage.getItem('key')) > -1
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -67,8 +67,8 @@ export default {
|
||||
},
|
||||
isHasKey () {
|
||||
const keyPage = this.$site.themeConfig.keyPage
|
||||
const {keys} = keyPage
|
||||
return keys.indexOf(sessionStorage.getItem('key')) > -1
|
||||
const keys = keyPage.keys
|
||||
return keys && keys.indexOf(sessionStorage.getItem('key')) > -1
|
||||
},
|
||||
inputFocus () {
|
||||
this.warningText = 'Input Your Key'
|
||||
|
Loading…
Reference in New Issue
Block a user