From 4fea7f57f237a0668aaedc5e870c7b9d9493df34 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 24 Jan 2019 11:11:07 +0000 Subject: [PATCH] `DataManager.pop` would emit the DataManager instance, instead of the parent, as the first event argument. It now emits the parent as it should do. Fix #4186 --- CHANGELOG.md | 1 + src/data/DataManager.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c42d94c490..2861722ae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -377,6 +377,7 @@ one set of bindings ever created, which makes things a lot cleaner. * The WebGLRenderer will now apply a transparent background if `transparent = true` in the game config (thanks @gomachan7) * `List.sort` was missing the scope required for the sort handler, this is now correctly provided internally. Fix #4241 (thanks @jcyuan) * `Container.sort` was missing the scope required for the sort handler, this is now correctly provided internally. Fix #4241 (thanks @jcyuan) +* `DataManager.pop` would emit the DataManager instance, instead of the parent, as the first event argument. It now emits the parent as it should do. Fix #4186 (thanks @gadelan) ### Examples and TypeScript diff --git a/src/data/DataManager.js b/src/data/DataManager.js index 87df7834c6..d620709089 100644 --- a/src/data/DataManager.js +++ b/src/data/DataManager.js @@ -502,7 +502,7 @@ var DataManager = new Class({ delete this.list[key]; delete this.values[key]; - this.events.emit(Events.REMOVE_DATA, this, key, data); + this.events.emit(Events.REMOVE_DATA, this.parent, key, data); } return data;