pace icon indicating copy to clipboard operation
pace copied to clipboard

running two pace progress bars, duplicates info on second

Open rkoberg opened this issue 10 years ago • 2 comments

See screen grab. The first progress bar completes when it gets to the constructed total. The second one has duplicates progress data. (this time with correct screen grab) screen shot 2015-02-10 at 10 39 40 am

rkoberg avatar Feb 10 '15 18:02 rkoberg

+1

img-2015-07-26-15-42-54

monolithed avatar Jul 26 '15 12:07 monolithed

If you have multiple instances of pace running in various parts of your application, from the second run onwards you might notice that the progress bar is not rendered correctly with duplicate output. This effect is additive for each time pace is required with the same stream.

Cause: The problem is with pace dependency charm. In node.js 0.10 the EventEmitter constructor explicitly initializes this._events, so going Charm.prototype = new Stream; causes all Charm instances to share the same _events property.

Fix: Change the charm main module file index.js and replace Charm.prototype = new Stream; with Charm.prototype = Stream.prototype;

check my fork at:https://github.com/ahmadassaf/Awesome-Progress

ahmadassaf avatar Sep 04 '15 19:09 ahmadassaf