Skip to content

Commit

Permalink
fix missing tip bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zippy committed Jan 10, 2024
1 parent bcd8d51 commit 848cbed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/boardList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class BoardList {
board => board.workspace.tip
)
console.log("boardData2:main")
return alwaysSubscribed(pipe(joinAsync([board, latestState, tip]), ([board, latestState, tip]) => {console.log("boardData2:pipe"); return {board,latestState, tip: tip.entryHash}}))
return alwaysSubscribed(pipe(joinAsync([board, latestState, tip]), ([board, latestState, tip]) => {return {board,latestState, tip: tip ? tip.entryHash: undefined}}))
})


Expand Down
2 changes: 1 addition & 1 deletion ui/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class KanDoStore {
}
if (board != undefined) {
this.unsub = board.workspace.tip.subscribe((tip)=>{
if (tip.status == "complete") {
if (tip.status == "complete" && tip.value) {
this.updateSeenTip(board.hash, tip.value.entryHash)
}
})
Expand Down

0 comments on commit 848cbed

Please sign in to comment.