Fixed wrong args.

d6
Frode Petterson 2014-12-15 11:50:48 +01:00
parent 2bba9a183b
commit acb36845c0
1 changed files with 2 additions and 3 deletions

View File

@ -112,14 +112,13 @@ H5P.EventDispatcher = (function () {
* @param {String} type Event type * @param {String} type Event type
* @param {...*} args * @param {...*} args
*/ */
self.trigger = function (type, args) { self.trigger = function (type) {
if (events[type] === undefined) { if (events[type] === undefined) {
return; return;
} }
// Copy all arguments except the first // Copy all arguments except the first
args = []; var i, args = [];
var i;
for (i = 1; i < arguments.length; i++) { for (i = 1; i < arguments.length; i++) {
args.push(arguments[i]); args.push(arguments[i]);
} }