Skip to content

Commit

Permalink
Make sure the content variable is not undefined. #596 #664
Browse files Browse the repository at this point in the history
  • Loading branch information
oldj committed May 26, 2022
1 parent 8858a03 commit 71c25fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/main/actions/hosts/getHistoryList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,12 @@ import { swhdb } from '@main/data'
import { IHostsHistoryObject } from '@root/common/data'

export default async (): Promise<IHostsHistoryObject[]> => {
return await swhdb.collection.history.all()
let list = await swhdb.collection.history.all<IHostsHistoryObject>()

list = list.map((item) => {
item.content = item.content || ''
return item
})

return list
}
2 changes: 1 addition & 1 deletion src/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[4, 1, 2, 6081]
[4, 1, 2, 6082]

0 comments on commit 71c25fc

Please sign in to comment.