mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: Add example of null to assert.ifError
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
@@ -442,6 +442,8 @@ argument in callbacks.
|
||||
```js
|
||||
const assert = require('assert').strict;
|
||||
|
||||
assert.ifError(null);
|
||||
// OK
|
||||
assert.ifError(0);
|
||||
// OK
|
||||
assert.ifError(1);
|
||||
|
||||
Reference in New Issue
Block a user