do not allow locks on undefined

This commit is contained in:
Ivan Socolsky 2015-02-11 11:40:48 -03:00
parent 469d7dfebe
commit 628dc12d00
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@ var Utils = {};
Utils.runLocked = function(token, cb, task) { Utils.runLocked = function(token, cb, task) {
var self = this; var self = this;
$.shouldBeDefined(token);
Lock.get(token, function(lock) { Lock.get(token, function(lock) {
var _cb = function() { var _cb = function() {
cb.apply(null, arguments); cb.apply(null, arguments);