perf: fix Canvas warning

This commit is contained in:
pipipi-pikachu 2023-07-16 16:24:21 +08:00
parent 02f8f8461d
commit 0b5615c533

View File

@ -14,7 +14,7 @@ export const isSupportFont = (fontName: string) => {
const str = 'a' const str = 'a'
const canvas = document.createElement('canvas') const canvas = document.createElement('canvas')
const ctx = canvas.getContext('2d') const ctx = canvas.getContext('2d', { willReadFrequently: true })
if (!ctx) return false if (!ctx) return false