Web: prevent error when notification popover is empty
This commit is contained in:
parent
d5e5e7b566
commit
034d75a9b8
@ -46,6 +46,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
function _scrollToBottom() {
|
||||
if (notifs.empty) return;
|
||||
tabulator.scrollToRow(notifs.lastID, "bottom", false);
|
||||
}
|
||||
function _subscribeToPinia() {
|
||||
|
@ -22,6 +22,9 @@ export const useNotifs = defineStore('notifications', {
|
||||
hideTimerID: 0,
|
||||
lastID: 0,
|
||||
}),
|
||||
getters: {
|
||||
empty: (state) => state.history.length == 0,
|
||||
},
|
||||
actions: {
|
||||
/**
|
||||
* Add a simple notification.
|
||||
|
Loading…
x
Reference in New Issue
Block a user