Skip to content

Commit

Permalink
Restore document?.documentElement
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Mar 29, 2024
1 parent ef12aee commit 3d2b2cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/contentScript/sidebarDomControllerLite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ import { uuidv4 } from "@/types/helpers";
export const SIDEBAR_WIDTH_CSS_PROPERTY = "--pb-sidebar-width";
const ORIGINAL_MARGIN_CSS_PROPERTY = "--pb-original-margin-right";

// Use ? because it's somehow not defined in e2e tests. But otherwise it will always be defined.
// eslint-disable-next-line local-rules/persistBackgroundData -- Static
const html: HTMLElement = globalThis.document.documentElement;
const html: HTMLElement = globalThis.document?.documentElement;
const SIDEBAR_WIDTH_PX = 400;

function storeOriginalCSSOnce() {
Expand Down

0 comments on commit 3d2b2cd

Please sign in to comment.