Skip to content

Commit 1e8d120

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 46e4311 commit 1e8d120

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
@@ -254,6 +254,8 @@ argument in callbacks.
254254
```js
255255
const assert = require('assert');
256256

257+
assert.ifError(null);
258+
// OK
257259
assert.ifError(0);
258260
// OK
259261
assert.ifError(1);

0 commit comments

Comments
 (0)