Skip to content

Commit 40a05d8

Browse files
committed
fix: adding null check
Signed-off-by: Pawel Psztyc <jarrodek@gmail.com>
1 parent be66fda commit 40a05d8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@api-components/amf-web-api",
33
"description": "A web service parsing APIs with the AMF parser.",
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"license": "Apache-2.0",
66
"main": "index.js",
77
"module": "index.js",

src/AmfParser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class AmfParser {
181181
} else {
182182
this.result = /** @type any */ (result.result);
183183
}
184-
if (this.process.connected) {
184+
if (this.process && this.process.connected) {
185185
this.process.disconnect();
186186
}
187187
}
@@ -193,7 +193,7 @@ export class AmfParser {
193193
// console.error(err);
194194
this.status = 'failed';
195195
this.error = err.message;
196-
if (this.process.connected) {
196+
if (this.process && this.process.connected) {
197197
this.process.disconnect();
198198
}
199199
}

0 commit comments

Comments
 (0)