Skip to content

Commit 46ced1a

Browse files
committed
fix: eslint error
1 parent 07f1951 commit 46ced1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/Canvas.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export default class Canvas {
6767
if (result) {
6868
this._resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {
6969
const entry = entries.find((entry: ResizeObserverEntry) => entry.target === this._element)
70-
if (isValid(entry?.devicePixelContentBoxSize?.[0])) {
71-
const size = (entry!.devicePixelContentBoxSize[0])!
70+
const size = entry?.devicePixelContentBoxSize?.[0]
71+
if (isValid(size)) {
7272
const width = size.inlineSize
7373
const height = size.blockSize
7474
if (this._pixelWidth !== width || this._pixelHeight !== height) {

0 commit comments

Comments
 (0)