We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07f1951 commit 46ced1aCopy full SHA for 46ced1a
src/common/Canvas.ts
@@ -67,8 +67,8 @@ export default class Canvas {
67
if (result) {
68
this._resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {
69
const entry = entries.find((entry: ResizeObserverEntry) => entry.target === this._element)
70
- if (isValid(entry?.devicePixelContentBoxSize?.[0])) {
71
- const size = (entry!.devicePixelContentBoxSize[0])!
+ const size = entry?.devicePixelContentBoxSize?.[0]
+ if (isValid(size)) {
72
const width = size.inlineSize
73
const height = size.blockSize
74
if (this._pixelWidth !== width || this._pixelHeight !== height) {
0 commit comments