Skip to content

Commit

Permalink
fix no-undef errors
Browse files Browse the repository at this point in the history
  • Loading branch information
djahandarie committed Dec 11, 2024
1 parent 0956c05 commit a8fb1b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ext/js/background/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export class Backend {
this._translator = new Translator(this._dictionaryDatabase);
/** @type {ClipboardReader|ClipboardReaderProxy} */
this._clipboardReader = new ClipboardReader(
// eslint-disable-next-line no-undef
(typeof document === 'object' && document !== null ? document : null),
'#clipboard-paste-target',
'#clipboard-rich-content-paste-target',
Expand Down
1 change: 1 addition & 0 deletions ext/js/dictionary/dictionary-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ export class DictionaryDatabase {
// The second branch can eventually be changed to use ImageDecoder when we are okay with dropping support for Firefox <133
// The branches can be unified entirely when Firefox implements support for transferring VideoFrames cross-process in postMessage
if ('serviceWorker' in navigator) { // this is just a check for chrome, we don't actually use service worker functionality here
// eslint-disable-next-line no-undef
const imageDecoder = new ImageDecoder({type: m.mediaType, data: m.content});
await imageDecoder.decode().then((decodedImageResult) => {
source.postMessage({action: 'drawDecodedImageToCanvases', params: {decodedImage: decodedImageResult.image, canvasIndexes: m.canvasIndexes, generation: m.generation}}, [decodedImageResult.image]);
Expand Down

0 comments on commit a8fb1b8

Please sign in to comment.