Skip to content

Commit 98c5a94

Browse files
author
Andreas Müller
committed
fixed title when syncing after gtt create
1 parent 7e23905 commit 98c5a94

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/include/tasks.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class tasks {
6666
this.sync.resources[project][type][id]
6767
.make(project, id, frame.resource.new)
6868
.then(() => {
69-
frame.title = this.sync.resources[type][id].data.title;
7069
if (callback) callback();
7170
done();
7271
})
@@ -82,8 +81,10 @@ class tasks {
8281
let project = frame.project,
8382
type = frame.resource.type,
8483
id = frame.resource.id;
84+
85+
if(id in this.sync.resources[project][type]) {
86+
frame.title = this.sync.resources[project][type][id].data.title;
8587
}
86-
8788
return done();
8889
});
8990
}
@@ -116,6 +117,7 @@ class tasks {
116117
.then(() => {
117118
if (frame.resource.new) {
118119
delete frame.resource.new;
120+
frame.resource.title = frame.resource.id;
119121
frame.resource.id = resource.data.iid;
120122
}
121123

src/models/hasTimes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class hasTimes extends Base {
2727
* @returns {*}
2828
*/
2929
createTime(time, created_at, note) {
30-
if(note === null) {
30+
if(note === null || note === undefined) {
3131
note = '';
3232
}
3333
else {

0 commit comments

Comments
 (0)