Fossil SCM

Removed an unnecessary level of if(...).

stephan 2021-01-05 05:40 trunk
Commit 2d329da18979aefa8042316977e153720e31b147f258155f713fbb586d9b9339
1 file changed +2 -4
+2 -4
--- src/chat.js
+++ src/chat.js
@@ -376,14 +376,12 @@
376376
*/
377377
playNewMessageSound: function f(){
378378
if(f.uri){
379379
try{
380380
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();
385383
}catch(e){
386384
console.error("Audio playblack failed.",e);
387385
}
388386
}
389387
return this;
390388
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button