Skip to content
This repository was archived by the owner on Nov 10, 2020. It is now read-only.

Commit 28806ef

Browse files
authored
Merge pull request #182 from tahnik/notif_fix
Notif fix
2 parents 218e7ef + f1d96dc commit 28806ef

3 files changed

Lines changed: 15 additions & 10 deletions

File tree

app/src/main/js/actions/notifs.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,22 @@ const fetchNotifs = () => (dispatch, getState) => {
3131
fetching = false;
3232
let noChange = true;
3333

34-
if (prevNotifs.num_unread === res.data.num_unread) {
34+
if (prevNotifs && prevNotifs.num_unread === res.data.num_unread) {
3535
const nextnotifItems = res.data.items;
3636
let j = 0;
37-
while (j < nextnotifItems.length) {
38-
const prevItem = prevNotifs.items[j];
39-
const nextItem = nextnotifItems[j];
40-
if (
37+
if (nextnotifItems) {
38+
while (j < nextnotifItems.length) {
39+
const prevItem = prevNotifs.items[j];
40+
const nextItem = nextnotifItems[j];
41+
if (
4142
prevItem.rant_id !== nextItem.rant_id
4243
|| prevItem.read !== nextItem.read
4344
) {
44-
noChange = false;
45-
break;
45+
noChange = false;
46+
break;
47+
}
48+
j += 1;
4649
}
47-
j += 1;
4850
}
4951
} else {
5052
noChange = false;

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devrantron",
3-
"version": "1.3.3",
3+
"version": "1.3.4",
44
"main": "./app/build/app.js",
55
"description": "An open source cross platform desktop application for devRant",
66
"scripts": {
@@ -55,6 +55,9 @@
5555
"AppImage"
5656
]
5757
},
58+
"mac": {
59+
"category": "public.app-category.developer-tools"
60+
},
5861
"directories": {
5962
"output": "release"
6063
}

0 commit comments

Comments
 (0)