Skip to content

Commit d554b8a

Browse files
LekoMylesBorins
authored andcommitted
doc: Add example of null to assert.ifError
PR-URL: #18236 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 74d86cc commit d554b8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/assert.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ argument in callbacks.
337337
```js
338338
const assert = require('assert');
339339

340+
assert.ifError(null);
341+
// OK
340342
assert.ifError(0);
341343
// OK
342344
assert.ifError(1);

0 commit comments

Comments
 (0)