Skip to content

Commit a02945f

Browse files
committed
[compare] fix bug
1 parent 7453598 commit a02945f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/compare/api/api.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,14 @@ var exported = {},
184184
};
185185

186186
var data = {id: app._id, name: app.name, sessions: sessionData.total_sessions, users: sessionData.total_users, newusers: sessionData.new_users, duration: sessionData.total_time, avgduration: sessionData.avg_time, charts: charts};
187-
188187
callback(null, data);
189188
});
190189
});
191190
},
192-
function(res) {
191+
function(err, res) {
192+
if (err) {
193+
return common.returnMessage(params, 503, 'Fetch apps data failed');
194+
}
193195
common.returnOutput(params, res);
194196
});
195197
});

0 commit comments

Comments
 (0)