fixed canUpdate bug

This commit is contained in:
cubedro
2015-04-28 11:12:47 +03:00
parent a6077c1d92
commit 13680815f1
2 changed files with 10 additions and 2 deletions

View File

@@ -136,4 +136,12 @@ Collection.prototype.getHistory = function()
return this._history;
}
Collection.prototype.canNodeUpdate = function(id)
{
var node = this.getNode({id: id});
if(!node)
return false;
return node.canUpdate();
}
module.exports = Collection;