1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +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) {
return undefined;
}
if(tiddler.fields.text) {
if(tiddler.fields.text !== undefined) {
// Just return the text if we've got it
return tiddler.fields.text;
} 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
if(currRevision !== incomingRevision) {
// 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
self.enqueueSyncTask({
type: "load",