This repository was archived by the owner on Mar 29, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -247,21 +247,23 @@ export abstract class IOSProtocol extends ProtocolAdapter {
247247 private onGetMatchedStylesForNodeResult ( msg : any ) : Promise < any > {
248248 const result = msg . result ;
249249
250- // Convert all the rules into the chrome format
251- for ( let i in result . matchedCSSRules ) {
252- if ( result . matchedCSSRules [ i ] . rule ) {
253- this . mapRule ( result . matchedCSSRules [ i ] . rule ) ;
254- }
255- }
256-
257- for ( let i in result . inherited ) {
258- if ( result . inherited [ i ] . matchedCSSRules ) {
259- for ( let j in result . inherited [ i ] . matchedCSSRules ) {
260- if ( result . inherited [ i ] . matchedCSSRules [ j ] . rule ) {
261- this . mapRule ( result . inherited [ i ] . matchedCSSRules [ j ] . rule ) ;
262- }
263- }
264- }
250+ if ( result ) {
251+ // Convert all the rules into the chrome format
252+ for ( let i in result . matchedCSSRules ) {
253+ if ( result . matchedCSSRules [ i ] . rule ) {
254+ this . mapRule ( result . matchedCSSRules [ i ] . rule ) ;
255+ }
256+ }
257+
258+ for ( let i in result . inherited ) {
259+ if ( result . inherited [ i ] . matchedCSSRules ) {
260+ for ( let j in result . inherited [ i ] . matchedCSSRules ) {
261+ if ( result . inherited [ i ] . matchedCSSRules [ j ] . rule ) {
262+ this . mapRule ( result . inherited [ i ] . matchedCSSRules [ j ] . rule ) ;
263+ }
264+ }
265+ }
266+ }
265267 }
266268
267269 return Promise . resolve ( msg ) ;
You can’t perform that action at this time.
0 commit comments