Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
let backwardFillLight: CanvasPattern | null = null
let forwardFillDark: CanvasPattern | null = null
let backwardFillDark: CanvasPattern | null = null
const canvas = globalThis.document.createElement('canvas')
// @ts-expect-error getContext is undefined in the web worker
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (canvas?.getContext) {
// globalThis.document is undefined in the web worker, where this module is
// also loaded (but never uses these patterns, which are main-thread-only
// rendering fills)
const canvas = globalThis.document?.createElement('canvas')

Check failure on line 51 in packages/jbrowse-plugin-apollo/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts

View workflow job for this annotation

GitHub Actions / Lint

Unnecessary optional chain on a non-nullish value

Check failure on line 51 in packages/jbrowse-plugin-apollo/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts

View workflow job for this annotation

GitHub Actions / Strict lint and test

Unnecessary optional chain on a non-nullish value
if (canvas) {

Check failure on line 52 in packages/jbrowse-plugin-apollo/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts

View workflow job for this annotation

GitHub Actions / Lint

Unnecessary conditional, value is always truthy

Check failure on line 52 in packages/jbrowse-plugin-apollo/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts

View workflow job for this annotation

GitHub Actions / Strict lint and test

Unnecessary conditional, value is always truthy
for (const direction of ['forward', 'backward']) {
for (const themeMode of ['light', 'dark']) {
const canvas = document.createElement('canvas')
Expand Down
Loading