Browse Source

日常开发

林旭祥 10 months ago
parent
commit
ece23b5d01
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/utils/speech.ts

+ 2 - 2
src/utils/speech.ts

@@ -123,9 +123,9 @@ export const speckText = (text: any) => {
 //取消播放
 export const speckCancel = () => {
   if (speech && browserSupport == true) {
-    speech.cancel();
+    speech?.cancel();
   } else {
-    myAudio.pause();
+    myAudio?.pause();
   }
 };