Fix error when opts is null/undefined
This commit is contained in:
parent
6c3a700f01
commit
c5766e431c
|
@ -5,7 +5,7 @@ export default function openCompose(opts) {
|
|||
const top = Math.max(0, (screenHeight - 450) / 2);
|
||||
const width = Math.min(screenWidth, 600);
|
||||
const height = Math.min(screenHeight, 450);
|
||||
const winUID = opts.uid || Math.random();
|
||||
const winUID = opts?.uid || Math.random();
|
||||
const newWin = window.open(
|
||||
url,
|
||||
'compose' + winUID,
|
||||
|
|
Loading…
Reference in a new issue