From ee4a38257838572046687bd963b61bf38c7c3510 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 16 Feb 2021 15:38:43 +0100 Subject: [PATCH] revert this back --- src/domain/ViewModel.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/domain/ViewModel.js b/src/domain/ViewModel.js index 10fbf580..97a91700 100644 --- a/src/domain/ViewModel.js +++ b/src/domain/ViewModel.js @@ -78,9 +78,14 @@ export class ViewModel extends EventEmitter { // we probably are, if we're using routing with a url, we could just refresh. i18n(parts, ...expr) { // just concat for now - return parts.reduce((all, p, i) => { - return all + p + expr[i]; - }); + let result = ""; + for (let i = 0; i < parts.length; ++i) { + result = result + parts[i]; + if (i < expr.length) { + result = result + expr[i]; + } + } + return result; } updateOptions(options) {