Commit 47ca03a
committed
fix(signature-footer): save concrete template value instead of empty sentinel
Previously onTemplateReset and onCustomizeFooterTemplateChange used
footerTemplate:'' as a sentinel meaning 'use the inherited template'.
This sentinel relied on the value-computed hook to inject inheritedTemplate
at display time, but the emitted model value carried '' — which gets saved
to the user preference as-is.
On the next page load, if inheritedTemplate resolved to something different
(or to '' because no admin customization exists), the display and the
preference diverged, showing blank or the wrong value after reset.
Fix: make both operations save the concrete value:
- onTemplateReset now saves footerTemplate:props.inheritedTemplate so
the preference stores the real inherited default explicitly.
- onCustomizeFooterTemplateChange (enable path) now seeds the template
with the current display value (which already incorporates inheritedTemplate
via the computed) so enabling customization never stores an empty template
when an inherited default is available.
Signed-off-by: Vitor Mattos <[email protected]>1 parent 30cb40a commit 47ca03a
1 file changed
Lines changed: 12 additions & 2 deletions
File tree
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
270 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| |||
283 | 290 | | |
284 | 291 | | |
285 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
286 | 296 | | |
287 | 297 | | |
288 | | - | |
| 298 | + | |
289 | 299 | | |
290 | 300 | | |
291 | 301 | | |
| |||
0 commit comments