File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export class Response {
62
62
*/
63
63
constructor ( document : XMLDocument , connection : Connection ) {
64
64
const documentElement = document . documentElement ;
65
- if ( documentElement . hasChildNodes ( ) && documentElement . firstChild . nodeName === 'error' ) {
65
+ if ( documentElement . firstChild && documentElement . firstChild . nodeName === 'error' ) {
66
66
const errorNode = < Element > documentElement . firstChild ;
67
67
const code = parseInt ( errorNode . getAttribute ( 'code' ) ! ) ;
68
68
const message = errorNode . textContent ! ;
@@ -478,7 +478,7 @@ export class PropertyGetResponse extends Response {
478
478
*/
479
479
constructor ( document : XMLDocument , property : Property ) {
480
480
super ( document , property . context . stackFrame . connection ) ;
481
- this . children = Array . from ( document . documentElement . firstChild . childNodes ) . map ( ( propertyNode : Element ) => new Property ( propertyNode , property . context ) ) ;
481
+ this . children = Array . from ( document . documentElement . firstChild ! . childNodes ) . map ( ( propertyNode : Element ) => new Property ( propertyNode , property . context ) ) ;
482
482
}
483
483
}
484
484
You can’t perform that action at this time.
0 commit comments