Skip to content

Commit a697240

Browse files
Merge pull request #9 from freshcells/master
Fixed possible nullpointer.
2 parents 82130f4 + 54c9acb commit a697240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chunk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const getSelLength = (node) => {
99
if (node.type === 'rule') {
1010
return node.selectors.length;
1111
}
12-
if (node.type === 'atrule') {
12+
if (node.type === 'atrule' && node.nodes) {
1313
return 1 + node.nodes.reduce((memo, n) => {
1414
return memo + getSelLength(n);
1515
}, 0);

0 commit comments

Comments
 (0)