Преглед на файлове

Fix a bug in main.js

In global view, there is no ".category.all>a" element so we tried
to apply str2int on an undefined value.
In consequence, we were not able to mark several articles as read

This patch need to apply on 0.8.1 and 0.9.1

See https://github.com/marienfressinaud/FreshRSS/issues/649
Marien Fressinaud преди 11 години
родител
ревизия
5e2a01d61f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      p/scripts/main.js

+ 1 - 1
p/scripts/main.js

@@ -33,7 +33,7 @@ function needsScroll($elem) {
 }
 }
 
 
 function str2int(str) {
 function str2int(str) {
-	if (str == '') {
+	if (str == '' || str === undefined) {
 		return 0;
 		return 0;
 	}
 	}
 	return parseInt(str.replace(/\D/g, ''), 10) || 0;
 	return parseInt(str.replace(/\D/g, ''), 10) || 0;