From 4d0ed49bac227dedbe18759867047cb582489e75 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Wed, 11 Sep 2013 12:22:08 +0100 Subject: [PATCH] add var self = this to progress bar Fixes crash when using progress bar: ReferenceError: self is not defined at ProgressBar. (/home/cbryant/bl/node_modules/blessed/lib/widget.js:4862:11) ... v --- lib/widget.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/widget.js b/lib/widget.js index f7673e1..0bcaac1 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -4832,6 +4832,8 @@ Button.prototype.press = function() { */ function ProgressBar(options) { + var self = this; + if (!(this instanceof Node)) { return new ProgressBar(options); }