mirror of
https://github.com/bitwarden/clients.git
synced 2026-06-22 21:02:34 +08:00
[PM-15410][PM-15410] add nullish check when referencing document in BrowserPopupUtils (#12162)
Some checks failed
Chromatic / Check PR run (push) Has been cancelled
Scan / Check PR run (push) Has been cancelled
Testing / Check for test secrets (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-latest) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-latest) (push) Has been cancelled
Chromatic / Chromatic (push) Has been cancelled
Scan / SAST scan (push) Has been cancelled
Scan / Quality scan (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
Some checks failed
Chromatic / Check PR run (push) Has been cancelled
Scan / Check PR run (push) Has been cancelled
Testing / Check for test secrets (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (macos-latest) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (ubuntu-22.04) (push) Has been cancelled
Testing / Run Rust tests on ${{ matrix.os }} (windows-latest) (push) Has been cancelled
Chromatic / Chromatic (push) Has been cancelled
Scan / SAST scan (push) Has been cancelled
Scan / Quality scan (push) Has been cancelled
Testing / Run tests (push) Has been cancelled
* check if document is undefined before accessing `body`
This commit is contained in:
parent
d5b14d11d4
commit
d448db5ed7
@ -109,7 +109,10 @@ class BrowserPopupUtils {
|
||||
const defaultPopoutWindowOptions: chrome.windows.CreateData = {
|
||||
type: "popup",
|
||||
focused: true,
|
||||
width: Math.max(PopupWidthOptions.default, document.body.clientWidth),
|
||||
width: Math.max(
|
||||
PopupWidthOptions.default,
|
||||
typeof document === "undefined" ? PopupWidthOptions.default : document.body.clientWidth,
|
||||
),
|
||||
height: 630,
|
||||
};
|
||||
const offsetRight = 15;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user