Skip to content

Commit 72d559f

Browse files
committedMay 6, 2017
fix: android release
1 parent a72907b commit 72d559f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-audio",
3-
"version": "3.4.1",
3+
"version": "3.4.2",
44
"description": "NativeScript plugin to record and play audio.",
55
"main": "audio",
66
"typings": "index.d.ts",

‎src/android/recorder.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export class TNSRecorder implements TNSRecordI {
100100
public stop(): Promise<any> {
101101
return new Promise((resolve, reject) => {
102102
try {
103-
this.recorder.stop();
103+
if (this.recorder) {
104+
this.recorder.stop();
105+
}
104106
resolve();
105107
} catch (ex) {
106108
reject(ex);
@@ -111,7 +113,9 @@ export class TNSRecorder implements TNSRecordI {
111113
public dispose(): Promise<any> {
112114
return new Promise((resolve, reject) => {
113115
try {
114-
this.recorder.release();
116+
if (this.recorder) {
117+
this.recorder.release();
118+
}
115119
this.recorder = undefined;
116120
resolve();
117121
} catch (ex) {

0 commit comments

Comments
 (0)
Please sign in to comment.