Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2020-03-25 01:17:02 +0300
committerAnna Henningsen <anna@addaleax.net>2020-03-28 16:37:32 +0300
commit05aa67aa21b77933033027615eb30df70338c735 (patch)
treee6214515e3185c99218f72a5da23c41293067d91 /lib/internal/console
parent7d3791a3a4fced7ab524cfd34ecb3b9805d86e28 (diff)
console: fixup error message
Use "options.inspectOptions" instead of just "inspectOptions" Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/32475 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/internal/console')
-rw-r--r--lib/internal/console/constructor.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js
index f1ba8fbbd7c..dc8dcaa1d05 100644
--- a/lib/internal/console/constructor.js
+++ b/lib/internal/console/constructor.js
@@ -110,11 +110,14 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {
if (inspectOptions.colors !== undefined &&
options.colorMode !== undefined) {
throw new ERR_INCOMPATIBLE_OPTION_PAIR(
- 'inspectOptions.color', 'colorMode');
+ 'options.inspectOptions.color', 'colorMode');
}
optionsMap.set(this, inspectOptions);
} else if (inspectOptions !== undefined) {
- throw new ERR_INVALID_ARG_TYPE('inspectOptions', 'object', inspectOptions);
+ throw new ERR_INVALID_ARG_TYPE(
+ 'options.inspectOptions',
+ 'object',
+ inspectOptions);
}
// Bind the prototype functions to this Console instance