File tree Expand file tree Collapse file tree 8 files changed +8
-8
lines changed
Expand file tree Collapse file tree 8 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,6 @@ export abstract class DOMMatrixBase {
3434 }
3535
3636 static [ Symbol . hasInstance ] ( obj ) {
37- if ( obj . native && obj . constructor . name === 'DOMMatrix' ) return true ;
37+ if ( obj ? .native && obj . constructor . name === 'DOMMatrix' ) return true ;
3838 }
3939}
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ export abstract class ImageDataBase {
1313 }
1414
1515 static [ Symbol . hasInstance ] ( obj ) {
16- if ( obj . native && obj . constructor . name === 'ImageData' ) return true ;
16+ if ( obj ? .native && obj . constructor . name === 'ImageData' ) return true ;
1717 }
1818}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export abstract class Path2DBase {
1212 }
1313
1414 static [ Symbol . hasInstance ] ( obj ) {
15- if ( obj . native && obj . constructor . name === 'Path2D' ) return true ;
15+ if ( obj ? .native && obj . constructor . name === 'Path2D' ) return true ;
1616 }
1717
1818 public abstract addPath (
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export abstract class TextMetricsBase {
1010 }
1111
1212 static [ Symbol . hasInstance ] ( obj ) {
13- if ( obj . native && obj . constructor . name === 'TextMetrics' ) return true ;
13+ if ( obj ? .native && obj . constructor . name === 'TextMetrics' ) return true ;
1414 }
1515
1616 public abstract readonly width : number ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export class ImageAssetBase {
1010 }
1111
1212 static [ Symbol . hasInstance ] ( obj ) {
13- if ( obj . native && obj . constructor . name === 'ImageAsset' ) return true ;
13+ if ( obj ? .native && obj . constructor . name === 'ImageAsset' ) return true ;
1414 }
1515
1616}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export abstract class ImageBitmapBase {
1010 }
1111
1212 static [ Symbol . hasInstance ] ( obj ) {
13- if ( obj . native && obj . constructor . name === 'ImageBitmap' ) return true ;
13+ if ( obj ? .native && obj . constructor . name === 'ImageBitmap' ) return true ;
1414 }
1515
1616 abstract readonly width : number ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export abstract class TextDecoderBase {
1313 abstract decode ( buffer : ArrayBuffer | ArrayBufferView , options ?: any ) : string ;
1414
1515 static [ Symbol . hasInstance ] ( obj ) {
16- if ( obj . native && obj . constructor . name === 'TextDecoder' ) return true ;
16+ if ( obj ? .native && obj . constructor . name === 'TextDecoder' ) return true ;
1717 }
1818
1919}
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ export abstract class TextEncoderBase {
1313 abstract encode ( text : string ) : Uint8Array ;
1414
1515 static [ Symbol . hasInstance ] ( obj ) {
16- if ( obj . native && obj . constructor . name === 'TextEncoder' ) return true ;
16+ if ( obj ? .native && obj . constructor . name === 'TextEncoder' ) return true ;
1717 }
1818}
You can’t perform that action at this time.
0 commit comments