Use Array.isArray in i18n.js

pull/1/head
Scott Nonnenberg 7 years ago
parent bb73d470a5
commit 2384092e9e
No known key found for this signature in database
GPG Key ID: 5F82280C35134661

@ -18,7 +18,7 @@ exports.setup = (locale, messages) => {
}
const { message } = entry;
if (substitutions instanceof Array) {
if (Array.isArray(substitutions)) {
return substitutions.reduce(
(result, substitution) => result.replace(/\$.+?\$/, substitution),
message

Loading…
Cancel
Save