Skip to content

Commit

Permalink
fix(is-icon-ligature): prevent canvas2d warning willReadFrequently (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Rrroman authored Mar 6, 2023
1 parent 2ba2ae9 commit b3c52bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/commons/text/is-icon-ligature.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ function isIconLigature(
}

const canvasContext = cache.get('canvasContext', () =>
document.createElement('canvas').getContext('2d')
document
.createElement('canvas')
.getContext('2d', { willReadFrequently: true })
);
const canvas = canvasContext.canvas;

Expand Down

0 comments on commit b3c52bb

Please sign in to comment.