Skip to content

Commit 28851ff

Browse files
committed
Use hyphens instead of underscores. Fix phaserjs#3751
1 parent 52d04ee commit 28851ff

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Updates
88

99
* DataManager.removeValue (and by extension the `remove` method too) will not emit the parent of the DataManager as the 2nd argument in the `removedata` event, to keep it consistent with the set events (thanks @rexrainbow)
10+
* The docs for the Loader `filecomplete` event said that you could listen for a specific file using its type and key, i.e.: `filecomplete-image-monster`, however, the code used an underscore instead of a hyphen. We feel the hyphen looks cleaner, so the Loader code has been updated, meaning you can now use the hyphen version of the event properly (thanks @NokFrt)
1011

1112
### Bug Fixes
1213

src/loader/File.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ var File = new Class({
517517
var type = this.type;
518518

519519
this.loader.emit('filecomplete', key, type, data);
520-
this.loader.emit('filecomplete_' + type + '_' + key, key, type, data);
520+
this.loader.emit('filecomplete-' + type + '-' + key, key, type, data);
521521

522522
this.loader.flagForRemoval(this);
523523
},

0 commit comments

Comments
 (0)