File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-audio" ,
3
- "version" : " 3.4.1 " ,
3
+ "version" : " 3.4.2 " ,
4
4
"description" : " NativeScript plugin to record and play audio." ,
5
5
"main" : " audio" ,
6
6
"typings" : " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ export class TNSRecorder implements TNSRecordI {
100
100
public stop ( ) : Promise < any > {
101
101
return new Promise ( ( resolve , reject ) => {
102
102
try {
103
- this . recorder . stop ( ) ;
103
+ if ( this . recorder ) {
104
+ this . recorder . stop ( ) ;
105
+ }
104
106
resolve ( ) ;
105
107
} catch ( ex ) {
106
108
reject ( ex ) ;
@@ -111,7 +113,9 @@ export class TNSRecorder implements TNSRecordI {
111
113
public dispose ( ) : Promise < any > {
112
114
return new Promise ( ( resolve , reject ) => {
113
115
try {
114
- this . recorder . release ( ) ;
116
+ if ( this . recorder ) {
117
+ this . recorder . release ( ) ;
118
+ }
115
119
this . recorder = undefined ;
116
120
resolve ( ) ;
117
121
} catch ( ex ) {
You can’t perform that action at this time.
0 commit comments