mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-08 08:39:59 +00:00
Fix incorrect truthy check on potentially zero-value properties
This commit is contained in:
@@ -116,7 +116,12 @@ export default class ReceiverSelector extends TypedEventTarget<ReceiverSelectorE
|
|||||||
* left/top positions for the popup.
|
* left/top positions for the popup.
|
||||||
*/
|
*/
|
||||||
const refWin = await browser.windows.getCurrent();
|
const refWin = await browser.windows.getCurrent();
|
||||||
if (refWin.width && refWin.height && refWin.left && refWin.top) {
|
if (
|
||||||
|
refWin.width !== undefined &&
|
||||||
|
refWin.height !== undefined &&
|
||||||
|
refWin.left !== undefined &&
|
||||||
|
refWin.top !== undefined
|
||||||
|
) {
|
||||||
const centerX = refWin.left + refWin.width / 2;
|
const centerX = refWin.left + refWin.width / 2;
|
||||||
const centerY = refWin.top + refWin.height / 3;
|
const centerY = refWin.top + refWin.height / 3;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user