From d78103339d156a819003c4a065c56a91b1aa3b25 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 3 Mar 2012 21:12:11 +0100 Subject: [PATCH] Make sure value exists. --- src/util/ProxyContext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ProxyContext.js b/src/util/ProxyContext.js index 72124255..343445bf 100644 --- a/src/util/ProxyContext.js +++ b/src/util/ProxyContext.js @@ -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;