mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 11:46:23 +00:00
Merge pull request #3987 from Alys/soundOff404-Sep05
prevent harmless but annoying 404 errors for sound files when sound is off
This commit is contained in:
commit
7e91fa4524
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||
}
|
||||
|
||||
$rootScope.playSound = function(id){
|
||||
if (!user.preferences.sound) return;
|
||||
if (!user.preferences.sound || user.preferences.sound == 'off') return;
|
||||
var theme = user.preferences.sound;
|
||||
var file = 'audio/' + theme + '/' + id;
|
||||
document.getElementById('oggSource').src = file + '.ogg';
|
||||
|
|
|
|||
Loading…
Reference in a new issue