Skip to content

Commit 96ad5c6

Browse files
authored
Change implicit check in getResponse to explicit (#788)
* change implicit check for explicit * bump patch version * bump package lock Co-authored-by: Ilya Kuleshov <[email protected]>
1 parent 45747eb commit 96ad5c6

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

node/mock-answer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export class MockAnswers {
4747

4848
const cmd_answer = this._answers[cmd]!;
4949

50-
if (cmd_answer[key]) {
50+
//use this construction to avoid falsy zero
51+
if (cmd_answer[key] != null) {
5152
debug('found mock response');
5253
return cmd_answer[key];
5354
}

node/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "azure-pipelines-task-lib",
3-
"version": "3.1.7",
3+
"version": "3.1.8",
44
"description": "Azure Pipelines Task SDK",
55
"main": "./task.js",
66
"typings": "./task.d.ts",

0 commit comments

Comments
 (0)