Fossil SCM
Removed an unnecessary level of if(...).
Commit
2d329da18979aefa8042316977e153720e31b147f258155f713fbb586d9b9339
Parent
ca0eabfdae551b9…
1 file changed
+2
-4
+2
-4
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -376,14 +376,12 @@ | ||
| 376 | 376 | */ |
| 377 | 377 | playNewMessageSound: function f(){ |
| 378 | 378 | if(f.uri){ |
| 379 | 379 | try{ |
| 380 | 380 | if(!f.audio) f.audio = new Audio(F.rootPath+f.uri); |
| 381 | - if(f.audio){ | |
| 382 | - f.audio.currentTime = 0; | |
| 383 | - f.audio.play(); | |
| 384 | - } | |
| 381 | + f.audio.currentTime = 0; | |
| 382 | + f.audio.play(); | |
| 385 | 383 | }catch(e){ |
| 386 | 384 | console.error("Audio playblack failed.",e); |
| 387 | 385 | } |
| 388 | 386 | } |
| 389 | 387 | return this; |
| 390 | 388 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -376,14 +376,12 @@ | |
| 376 | */ |
| 377 | playNewMessageSound: function f(){ |
| 378 | if(f.uri){ |
| 379 | try{ |
| 380 | if(!f.audio) f.audio = new Audio(F.rootPath+f.uri); |
| 381 | if(f.audio){ |
| 382 | f.audio.currentTime = 0; |
| 383 | f.audio.play(); |
| 384 | } |
| 385 | }catch(e){ |
| 386 | console.error("Audio playblack failed.",e); |
| 387 | } |
| 388 | } |
| 389 | return this; |
| 390 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -376,14 +376,12 @@ | |
| 376 | */ |
| 377 | playNewMessageSound: function f(){ |
| 378 | if(f.uri){ |
| 379 | try{ |
| 380 | if(!f.audio) f.audio = new Audio(F.rootPath+f.uri); |
| 381 | f.audio.currentTime = 0; |
| 382 | f.audio.play(); |
| 383 | }catch(e){ |
| 384 | console.error("Audio playblack failed.",e); |
| 385 | } |
| 386 | } |
| 387 | return this; |
| 388 |