1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-17 11:30:02 +00:00
Robin Munn 51bdf60ee8
Fix bug when using built-in list field as listField parameter to checkbox widget (#6897)
* Fix bug with checkbox widget and `list` field

The `list` field is stored as a list and frozen against modifications,
and getFieldList() returns it directly without creating a copy. So
before we modify it, we need to make a copy so we're not modifying a
frozen list. This bug doesn't manifest with custom fields, which are
stored as strings, only with the built-in `list` field.

* Fix checkboxes referencing non-existent tiddlers

This fixes the "tiddler is undefined" error when a checkbox's listField
property references a tiddler that doesn't (yet) exist.

* Better logic for checkbox listField handling

If the field contains an array, then it's almost certainly referenced
elsewhere and needs a defensive copy made. If it contained a string,
then it's safe to modify without making a defensive copy.
2022-09-22 18:52:55 +01:00
..
2022-07-05 17:47:57 +01:00
2014-04-27 20:03:33 +01:00
2022-07-21 15:30:56 +01:00
2021-10-02 16:17:07 +01:00
2013-11-10 19:22:10 +00:00
2021-10-30 11:42:22 +01:00