0.9.1 同步问题; Api找不到

This commit is contained in:
life
2015-11-20 15:56:31 +08:00
parent 738f951f18
commit 70ff4f1e58
2 changed files with 12 additions and 1 deletions

9
node_modules/note.js generated vendored
View File

@@ -590,6 +590,13 @@ var Note = {
// 从服务器上获取内容
getNoteContentFromServer: function (serverNoteId, callback) {
var me = this;
if (!serverNoteId) {
callback(false);
return;
}
if (!Api) {
Api = require('api');
}
Api.getNoteContent(serverNoteId, function(noteContent) {
// 同步到本地
if(Common.isOk(noteContent)) {
@@ -694,7 +701,7 @@ var Note = {
console.error(doc.length + '. ..');
}
console.log('note length: ' + doc.length + '. ..');
if(err || !doc) {
if(err || !doc || !doc.length) {
log('getNoteByServerNoteId 不存在' + noteId);
callback && callback(false);
} else {