Skip to content

Commit

Permalink
Better null tiddler check for store - #53
Browse files Browse the repository at this point in the history
  • Loading branch information
BoyCook committed Dec 26, 2013
1 parent 2f7d2e3 commit 90b705e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions assets/space.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Space.prototype.init = function() {

Space.prototype.fetchTiddler = function(summary, success, error) {
var tiddler = this.getTiddler(summary.title);
if (typeof tiddler === "undefined") {
if (typeof tiddler === "undefined" || tiddler === null) {
this._fetchTiddler(summary, success, error);
} else {
if (success) {
Expand Down Expand Up @@ -52,8 +52,6 @@ Space.prototype.removeTiddler = function(title) {

Space.prototype.setTiddler = function(tiddler) {
this.store.setTiddler(tiddler);
// this.store.setTiddler({"title": "tiddler1"});
// localStorage.setItem("tiddler-" + tiddler.title, JSON.stringify(tiddler));
this.tiddlers[tiddler.title] = tiddler;
};

Expand Down

0 comments on commit 90b705e

Please sign in to comment.