From e48f143842991f741a076f249bb7e30d438bf576 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 19 Dec 2017 10:51:30 +0100 Subject: [PATCH] Allow numbers in _getKey parameters --- customize.dist/messages.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 588b259b0..806141c8b 100644 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -93,7 +93,11 @@ define(req, function(Util, Default, Language) { var text = messages[key]; if (typeof(text) === 'string') { return text.replace(/\{(\d+)\}/g, function (str, p1) { - return typeof(argArray[p1]) === 'string' ? argArray[p1] : ''; + if (typeof(argArray[p1]) === 'string' || typeof(argArray[p1]) === "number") { + return argArray[p1]; + } + console.error("Only strings and numbers can be used in _getKey params!"); + return ''; }); } else { return text;