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 {
34
34
}
35
35
36
36
static [ Symbol . hasInstance ] ( obj ) {
37
- if ( obj . native && obj . constructor . name === 'DOMMatrix' ) return true ;
37
+ if ( obj ? .native && obj . constructor . name === 'DOMMatrix' ) return true ;
38
38
}
39
39
}
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ export abstract class ImageDataBase {
13
13
}
14
14
15
15
static [ Symbol . hasInstance ] ( obj ) {
16
- if ( obj . native && obj . constructor . name === 'ImageData' ) return true ;
16
+ if ( obj ? .native && obj . constructor . name === 'ImageData' ) return true ;
17
17
}
18
18
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export abstract class Path2DBase {
12
12
}
13
13
14
14
static [ Symbol . hasInstance ] ( obj ) {
15
- if ( obj . native && obj . constructor . name === 'Path2D' ) return true ;
15
+ if ( obj ? .native && obj . constructor . name === 'Path2D' ) return true ;
16
16
}
17
17
18
18
public abstract addPath (
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export abstract class TextMetricsBase {
10
10
}
11
11
12
12
static [ Symbol . hasInstance ] ( obj ) {
13
- if ( obj . native && obj . constructor . name === 'TextMetrics' ) return true ;
13
+ if ( obj ? .native && obj . constructor . name === 'TextMetrics' ) return true ;
14
14
}
15
15
16
16
public abstract readonly width : number ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export class ImageAssetBase {
10
10
}
11
11
12
12
static [ Symbol . hasInstance ] ( obj ) {
13
- if ( obj . native && obj . constructor . name === 'ImageAsset' ) return true ;
13
+ if ( obj ? .native && obj . constructor . name === 'ImageAsset' ) return true ;
14
14
}
15
15
16
16
}
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export abstract class ImageBitmapBase {
10
10
}
11
11
12
12
static [ Symbol . hasInstance ] ( obj ) {
13
- if ( obj . native && obj . constructor . name === 'ImageBitmap' ) return true ;
13
+ if ( obj ? .native && obj . constructor . name === 'ImageBitmap' ) return true ;
14
14
}
15
15
16
16
abstract readonly width : number ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export abstract class TextDecoderBase {
13
13
abstract decode ( buffer : ArrayBuffer | ArrayBufferView , options ?: any ) : string ;
14
14
15
15
static [ Symbol . hasInstance ] ( obj ) {
16
- if ( obj . native && obj . constructor . name === 'TextDecoder' ) return true ;
16
+ if ( obj ? .native && obj . constructor . name === 'TextDecoder' ) return true ;
17
17
}
18
18
19
19
}
Original file line number Diff line number Diff line change @@ -13,6 +13,6 @@ export abstract class TextEncoderBase {
13
13
abstract encode ( text : string ) : Uint8Array ;
14
14
15
15
static [ Symbol . hasInstance ] ( obj ) {
16
- if ( obj . native && obj . constructor . name === 'TextEncoder' ) return true ;
16
+ if ( obj ? .native && obj . constructor . name === 'TextEncoder' ) return true ;
17
17
}
18
18
}
You can’t perform that action at this time.
0 commit comments