Bug report - 1.0.0 - removeEventListener

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

Post Reply
osc23
Posts: 17
Joined: 04 May 2007, 12:16
Location: London

Bug report - 1.0.0 - removeEventListener

Post by osc23 »

Hello all,

Found a small problem with this...

Code: Select all

SFS2X.EventDispatcher.prototype.removeEventListener = function (a, b)
{
	var c = this.listenersByEvent[a];
	if (null != listenersByEvent)
	{
		for (var d = 0; d < c.length; d++)
		{
			if (c[d].listener === b)
			{
				c.splice(d, 1);
				break
			}
		}
	}
};
I believe this should be if(null != c)

Thanks

osc23
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Bug report - 1.0.0 - removeEventListener

Post by Bax »

Thank you for reporting. We just published a new version fixing this bug.
Paolo Bax
The SmartFoxServer Team
Post Reply