Skip to content
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

Commit 88f85b5

Browse files
authored
Merge pull request #122 from qkdreyer/patch-1
fix: return empty array in case of invalid in extractDisabledStyles
2 parents b7473cd + 6ab2006 commit 88f85b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/protocols/ios/ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ export abstract class IOSProtocol extends ProtocolAdapter {
748748
} else if (styleText.substr(index, IOSProtocol.END_COMMENT.length) === IOSProtocol.END_COMMENT) {
749749
if (startIndices.length === 0) {
750750
// Invalid state
751-
return null;
751+
return [];
752752
}
753753

754754
const startIndex = startIndices.pop();
@@ -773,7 +773,7 @@ export abstract class IOSProtocol extends ProtocolAdapter {
773773

774774
if (startIndices.length !== 0) {
775775
// Invalid state
776-
return null;
776+
return [];
777777
}
778778

779779
return styles;

0 commit comments

Comments
 (0)