Make sure value exists.

This commit is contained in:
Jonathan Puckey 2012-03-03 21:12:11 +01:00
parent ed06901fb3
commit d78103339d

View file

@ -79,7 +79,7 @@ var ProxyContext = new function() {
} else {
var capitalized = Base.capitalize(name);
param['set' + capitalized] = function(value) {
var logValue = value.substring ? '\'' + value + '\'' : value,
var logValue = value && value.substring ? '\'' + value + '\'' : value,
string = 'ctx.' + name + ' = ' + logValue + ';';
console.log(this.getIndentation() + string);
return this._ctx[name] = value;