Skip to content

Commit

Permalink
Fix spurious warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Oct 5, 2022
1 parent 4ec2e07 commit 0bfffb8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion platform/common/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

// For background page

/* globals browser */

'use strict';

/******************************************************************************/
Expand Down Expand Up @@ -721,7 +723,8 @@ vAPI.setIcon = (( ) => {
for ( const img of imgs ) {
if ( img.r.complete === false ) { return; }
}
const ctx = document.createElement('canvas').getContext('2d');
const ctx = document.createElement('canvas')
.getContext('2d', { willReadFrequently: true });
const iconData = [ null, null ];
for ( const img of imgs ) {
if ( img.cached ) { continue; }
Expand Down

0 comments on commit 0bfffb8

Please sign in to comment.