Skip to content

Commit

Permalink
fix: eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
liihuu committed Mar 3, 2024
1 parent 07f1951 commit 46ced1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/Canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export default class Canvas {
if (result) {
this._resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {
const entry = entries.find((entry: ResizeObserverEntry) => entry.target === this._element)
if (isValid(entry?.devicePixelContentBoxSize?.[0])) {
const size = (entry!.devicePixelContentBoxSize[0])!
const size = entry?.devicePixelContentBoxSize?.[0]
if (isValid(size)) {
const width = size.inlineSize
const height = size.blockSize
if (this._pixelWidth !== width || this._pixelHeight !== height) {
Expand Down

0 comments on commit 46ced1a

Please sign in to comment.