outvariant
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -102,6 +102,8 @@ "use strict"; | ||
if (!predicate) { | ||
const formatMessage = positionals.length === 0 ? message : format(message, positionals); | ||
const formatMessage = positionals.length === 0 ? message : format(message, ...positionals); | ||
let error; | ||
try { | ||
error = Reflect.construct(ErrorConstructor, [formatMessage]); | ||
error = Reflect.construct(ErrorConstructor, [ | ||
formatMessage | ||
]); | ||
} catch (err) { | ||
@@ -108,0 +110,0 @@ error = ErrorConstructor(formatMessage); |
{ | ||
"name": "outvariant", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Type-safe implementation of invariant with positionals.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23152
224