add var self = this to progress bar

Fixes crash when using progress bar:
	ReferenceError: self is not defined
	at ProgressBar.<anonymous>
	(/home/cbryant/bl/node_modules/blessed/lib/widget.js:4862:11)
	...
						v
This commit is contained in:
Callan Bryant 2013-09-11 12:22:08 +01:00
parent ac54a9d944
commit 4d0ed49bac
1 changed files with 2 additions and 0 deletions

View File

@ -4832,6 +4832,8 @@ Button.prototype.press = function() {
*/
function ProgressBar(options) {
var self = this;
if (!(this instanceof Node)) {
return new ProgressBar(options);
}