mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Fix error when opts is null/undefined
This commit is contained in:
parent
6c3a700f01
commit
c5766e431c
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ export default function openCompose(opts) {
|
||||||
const top = Math.max(0, (screenHeight - 450) / 2);
|
const top = Math.max(0, (screenHeight - 450) / 2);
|
||||||
const width = Math.min(screenWidth, 600);
|
const width = Math.min(screenWidth, 600);
|
||||||
const height = Math.min(screenHeight, 450);
|
const height = Math.min(screenHeight, 450);
|
||||||
const winUID = opts.uid || Math.random();
|
const winUID = opts?.uid || Math.random();
|
||||||
const newWin = window.open(
|
const newWin = window.open(
|
||||||
url,
|
url,
|
||||||
'compose' + winUID,
|
'compose' + winUID,
|
||||||
|
|
Loading…
Reference in a new issue