Article.openInNewWindow: do not crash if window is null
This commit is contained in:
parent
8f5b5ae09e
commit
c8253f0e64
|
@ -109,10 +109,13 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
},
|
},
|
||||||
openInNewWindow: function (id) {
|
openInNewWindow: function (id) {
|
||||||
const w = window.open("");
|
const w = window.open("");
|
||||||
w.opener = null;
|
|
||||||
w.location = "backend.php?op=article&method=redirect&id=" + id;
|
|
||||||
|
|
||||||
Headlines.toggleUnread(id, 0);
|
if (w) {
|
||||||
|
w.opener = null;
|
||||||
|
w.location = "backend.php?op=article&method=redirect&id=" + id;
|
||||||
|
|
||||||
|
Headlines.toggleUnread(id, 0);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
render: function (article) {
|
render: function (article) {
|
||||||
App.cleanupMemory("content-insert");
|
App.cleanupMemory("content-insert");
|
||||||
|
|
Loading…
Reference in New Issue