Skip to content

Commit 77ed0e0

Browse files
committed
Fix parsing usage example (value may not be set)
1 parent 7168756 commit 77ed0e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/css/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const { definitionSyntax } = require('css-tree');
3030

3131
const { properties } = await css.listAll();
3232
for (const property of properties) {
33+
if (!property.value) {
34+
continue;
35+
}
3336
const ast = definitionSyntax.parse(property.value);
3437
// do something with the abstract syntax tree
3538
}

0 commit comments

Comments
 (0)