Commit 3dd0cfc
committed
Fix bug in repeated collapse of empty bodies
The initial rendering of the empty body wrote '' to the format cache,
and observes it. The second rendering reads from the cache, but then
because the value is falsey it writes to the cache again! This write
side-effect in a computed on an observable is bad bad bad and breaks the
rendering.
We now properly distinguish cache presence, not just falsey-ness.1 parent 7ecda0e commit 3dd0cfc
File tree
2 files changed
+13
-4
lines changed- src
- components/editor
- model
2 files changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
0 commit comments