You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The event 'removedata' is emitted in two places in DataManager.js. In removeValue() is emitted with this.parent as first parameter. What is passed is an EventEmitter: the GameObject (extended from EventEmitter) or the EventEmitter of a Game.
removeValue: function (key)
{
if (this.has(key))
{
var data = this.list[key];
delete this.list[key];
delete this.values[key];
this.events.emit('removedata', **this.parent**, key, data);
}
return this;
},
But in pop() is emitted with this as first parameter. This emission passes the DataManager (and it is not an EventEmitter).
pop: function (key)
{
var data = undefined;
if (!this._frozen && this.has(key))
{
data = this.list[key];
delete this.list[key];
delete this.values[key];
this.events.emit('removedata', **this**, key, data);
}
return data;
},
Additional Information
This is probably a typo, but my knowledge of the source code is not enough to be sure of it. If this is found to be a bug, fixing it would be easy.
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
The event 'removedata' is emitted in two places in DataManager.js. In removeValue() is emitted with this.parent as first parameter. What is passed is an EventEmitter: the GameObject (extended from EventEmitter) or the EventEmitter of a Game.
But in pop() is emitted with this as first parameter. This emission passes the DataManager (and it is not an EventEmitter).
Additional Information
This is probably a typo, but my knowledge of the source code is not enough to be sure of it. If this is found to be a bug, fixing it would be easy.
The text was updated successfully, but these errors were encountered: