fix: fixed application crash when count is zero
This commit is contained in:
parent
14cc456d0e
commit
3c5dc5276d
@ -11,8 +11,8 @@ Page(
|
||||
onInit() {
|
||||
this.getTOTPData().then((x) => {
|
||||
console.log(x)
|
||||
localStorage.setItem('TOTPs', x)
|
||||
app._options.globalData.TOTPS = x
|
||||
localStorage.setItem('TOTPs', x ?? [])
|
||||
app._options.globalData.TOTPS = x ?? []
|
||||
this.initPage();
|
||||
})
|
||||
.catch(() => {
|
||||
|
@ -5,7 +5,7 @@ let _props = null;
|
||||
AppSettingsPage({
|
||||
build(props) {
|
||||
_props = props;
|
||||
const storage = props.settingsStorage.getItem("TOTPs")
|
||||
const storage = props.settingsStorage.getItem("TOTPs") ?? []
|
||||
const totpEntrys = GetTOTPList(storage)
|
||||
const createButton = TextInput({
|
||||
placeholder: "otpauth://",
|
||||
|
Loading…
x
Reference in New Issue
Block a user