Commit c9b2569
Add optional chain to sizes indexing of media details in edit-site (#68995)
This optional chaining is already present in 21 other lines in Gutenberg where `sizes` (in `media_details`) is indexed, but is missing on these two lines.
For some reason, `media_details` is an empty object for some of my attachments on my site, so this throws a TypeError. This change resolves this issue.
Co-authored-by: grgar <grgarside@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>1 parent 24fad40 commit c9b2569
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments