1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-05 01:26:18 +00:00

Fix tag saving

This commit is contained in:
Jeremy Ruston 2023-07-19 19:52:34 +01:00
parent 09b0e2815c
commit 2cd2a057f8

View File

@ -103,6 +103,7 @@ $tw.SqlFunctions = function(options) {
JOIN tags ON tag_values.tag = tags.tag;
`);
this.sqlSaveTiddler = function(tiddlerFields,shadowSource) {
var tags = JSON.stringify($tw.utils.parseStringArray(tiddlerFields.tags) || []);
querySaveTiddlerTableTiddlers.bind({
$title: tiddlerFields.title,
$shadow: shadowSource ? 1 : 0,
@ -113,14 +114,14 @@ $tw.SqlFunctions = function(options) {
querySaveTiddlerTableTiddlers.step();
querySaveTiddlerTableTiddlers.reset();
querySaveTiddlerTableTags.bind({
$tags: JSON.stringify(tiddlerFields.tags || [])
$tags: tags
});
querySaveTiddlerTableTags.step();
querySaveTiddlerTableTags.reset();
querySaveTiddlerTableTiddlerTags.bind({
$title: tiddlerFields.title,
$shadow: shadowSource ? 1 : 0,
$tags: JSON.stringify(tiddlerFields.tags || [])
$tags: tags
});
querySaveTiddlerTableTiddlerTags.step();
querySaveTiddlerTableTiddlerTags.reset();