no crash on delete without callback

This commit is contained in:
Jeena Paradies 2013-01-27 09:15:28 +01:00
parent d99b58fd3c
commit b5d8417d8c

View file

@ -134,7 +134,10 @@ function(Core, Paths, HostApp, URI) {
Timeline.prototype.remove = function(id, callback) {
var _this = this;
var new_callback = function(data) { callback(data); _this.getNewData(); }
var new_callback = function(data) {
if(callback) callback(data);
_this.getNewData();
}
Core.prototype.remove.call(this, id, new_callback);
}