Skip to content

Commit c5311ee

Browse files
committed
[css-layout-api] Fix example.
1 parent 0733950 commit c5311ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

css-layout-api/Overview.bs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2246,9 +2246,9 @@ creates child layout constraints which specify that a child should be a fixed in
22462246
<pre class="lang-javascript">
22472247
registerLayout('flex-distribution-like', class {
22482248
async intrinsicSizes(children, edges, styleMap) {
2249-
const childrenSizes = children.map((child) => {
2249+
const childrenSizes = await Promise.all(children.map((child) => {
22502250
return child.intrinsicSizes();
2251-
});
2251+
}));
22522252

22532253
const maxContentSize = childrenSizes.reduce((sum, childSizes) => {
22542254
return sum + childSizes.maxContentSize;

0 commit comments

Comments
 (0)