Mistake in mkEvent which makes all events only work once

This commit is contained in:
Caleb James DeLisle 2017-09-25 18:03:31 +02:00
parent a8eecee590
commit 1fd7a6e2b3

View File

@ -16,7 +16,7 @@ define([], function () {
handlers.splice(handlers.indexOf(cb), 1); handlers.splice(handlers.indexOf(cb), 1);
}, },
fire: function () { fire: function () {
if (fired) { return; } if (once && fired) { return; }
fired = true; fired = true;
var args = Array.prototype.slice.call(arguments); var args = Array.prototype.slice.call(arguments);
handlers.forEach(function (h) { h.apply(null, args); }); handlers.forEach(function (h) { h.apply(null, args); });