Skip to content

Commit 04d22e6

Browse files
committed
luci-app-adblock: fix the report initialization
Signed-off-by: Dirk Brenken <[email protected]>
1 parent d971e88 commit 04d22e6

File tree

1 file changed

+3
-7
lines changed
  • applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock

1 file changed

+3
-7
lines changed

applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/dnsreport.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,20 +245,16 @@ return view.extend({
245245
},
246246

247247
render: function(dnsreport) {
248-
let content, notMsg, errMsg;
248+
let content=[], notMsg, errMsg;
249249

250250
if (dnsreport) {
251251
try {
252252
content = JSON.parse(dnsreport[0]);
253253
} catch (e) {
254-
content = "";
255-
if (!errMsg) {
256-
errMsg = true;
257-
ui.addNotification(null, E('p', _('Unable to parse the report file!')), 'error');
258-
}
254+
content[0] = "";
259255
}
260256
} else {
261-
content = "";
257+
content[0] = "";
262258
}
263259

264260
var rows_top = [];

0 commit comments

Comments
 (0)