1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-07 14:23:53 +00:00

Fixed issues with blank tiddler text

The empty string is falsy in JavaScript, to keep us on our toes.
This commit is contained in:
Jeremy Ruston 2012-11-23 13:08:10 +00:00
parent db1836cc57
commit 580bd6438e
2 changed files with 2 additions and 2 deletions

View File

@ -759,7 +759,7 @@ exports.getTiddlerText = function(title) {
if(!tiddler) { if(!tiddler) {
return undefined; return undefined;
} }
if(tiddler.fields.text) { if(tiddler.fields.text !== undefined) {
// Just return the text if we've got it // Just return the text if we've got it
return tiddler.fields.text; return tiddler.fields.text;
} else { } else {

View File

@ -251,7 +251,7 @@ TiddlyWebSyncer.prototype.syncFromServer = function() {
// Ignore the incoming tiddler if it's the same as the revision we've already got // Ignore the incoming tiddler if it's the same as the revision we've already got
if(currRevision !== incomingRevision) { if(currRevision !== incomingRevision) {
// Do a full load if we've already got a fat version of the tiddler // Do a full load if we've already got a fat version of the tiddler
if(tiddler && tiddler.fields.text) { if(tiddler && tiddler.fields.text !== undefined) {
// Do a full load of this tiddler // Do a full load of this tiddler
self.enqueueSyncTask({ self.enqueueSyncTask({
type: "load", type: "load",