Update src/EventDispatcher.js

Have an array all the time and copy into it before dispatching.Solve when a listener is deleted caused by the BUG