inquirerer 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/prompt.js CHANGED
@@ -168,6 +168,7 @@ export class Inquirerer {
168
168
  }
169
169
  else {
170
170
  this.rl = null;
171
+ this.keypress = null;
171
172
  }
172
173
  }
173
174
  clearScreen() {
@@ -436,7 +437,7 @@ export class Inquirerer {
436
437
  }
437
438
  }
438
439
  async handleQuestionType(question, ctx) {
439
- this.keypress.clearHandlers();
440
+ this.keypress?.clearHandlers();
440
441
  switch (question.type) {
441
442
  case 'confirm':
442
443
  return this.confirm(question, ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inquirerer",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "inquirerer",
6
6
  "main": "index.js",
@@ -35,5 +35,5 @@
35
35
  "minimist": "^1.2.8"
36
36
  },
37
37
  "keywords": [],
38
- "gitHead": "f98034d733c0a9f3f1b1c9565698362534d2c720"
38
+ "gitHead": "9f50b55ef2ade53350fb6983785257b68639e032"
39
39
  }
package/prompt.js CHANGED
@@ -174,6 +174,7 @@ class Inquirerer {
174
174
  }
175
175
  else {
176
176
  this.rl = null;
177
+ this.keypress = null;
177
178
  }
178
179
  }
179
180
  clearScreen() {
@@ -442,7 +443,7 @@ class Inquirerer {
442
443
  }
443
444
  }
444
445
  async handleQuestionType(question, ctx) {
445
- this.keypress.clearHandlers();
446
+ this.keypress?.clearHandlers();
446
447
  switch (question.type) {
447
448
  case 'confirm':
448
449
  return this.confirm(question, ctx);