Skip to content

Commit

Permalink
fix: android release
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed May 6, 2017
1 parent a72907b commit 72d559f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-audio",
"version": "3.4.1",
"version": "3.4.2",
"description": "NativeScript plugin to record and play audio.",
"main": "audio",
"typings": "index.d.ts",
Expand Down
8 changes: 6 additions & 2 deletions src/android/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export class TNSRecorder implements TNSRecordI {
public stop(): Promise<any> {
return new Promise((resolve, reject) => {
try {
this.recorder.stop();
if (this.recorder) {
this.recorder.stop();
}
resolve();
} catch (ex) {
reject(ex);
Expand All @@ -111,7 +113,9 @@ export class TNSRecorder implements TNSRecordI {
public dispose(): Promise<any> {
return new Promise((resolve, reject) => {
try {
this.recorder.release();
if (this.recorder) {
this.recorder.release();
}
this.recorder = undefined;
resolve();
} catch (ex) {
Expand Down

0 comments on commit 72d559f

Please sign in to comment.