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 <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
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

+2
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)