mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 15:41:19 +00:00
0.9.1 同步问题; Api找不到
This commit is contained in:
9
node_modules/note.js
generated
vendored
9
node_modules/note.js
generated
vendored
@@ -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 {
|
||||
|
Reference in New Issue
Block a user