1
0
mirror of https://github.com/2ec0b4/kaamelott-soundboard.git synced 2025-12-09 16:05:35 +00:00

Fait en sorte de ne jouer le son qu'une seule fois au chargement (#15)

This commit is contained in:
Antoine
2016-12-01 23:05:18 +01:00
committed by GitHub
parent 4c18df3c1a
commit 41816fce5a
3 changed files with 6 additions and 2 deletions

View File

@@ -32,11 +32,12 @@ define("views/sounds", function(require) {
onBeforeRender: function() {
var sound;
if( this.slug ) {
if( !!this.slug ) {
sound = this.collection.findWhere({file: this.slug+".mp3"});
if( sound ) {
sound.set('selected', true);
this.slug = "";
}
}
},