From a889183325d88881d3064d98a4cd978367dfccf1 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Sat, 17 Nov 2018 07:26:30 -0800 Subject: [PATCH] fix text-counter adding empty prefixes/suffixes --- src/components/text-counter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/text-counter.js b/src/components/text-counter.js index e777448..c1f4b6f 100644 --- a/src/components/text-counter.js +++ b/src/components/text-counter.js @@ -20,7 +20,7 @@ AFRAME.registerComponent('text-counter', { update: function (oldData) { this.currentValue = 0; - this.textValue.value = `${this.data.prefix} ${this.decimals(0)} ${this.data.suffix}`; + this.textValue.value = `${this.data.prefix}${this.decimals(0)}${this.data.suffix}`; this.el.setAttribute('text', this.textValue); }, @@ -35,7 +35,7 @@ AFRAME.registerComponent('text-counter', { } this.textValue.value = - `${this.data.prefix} ${this.decimals(this.currentValue)} ${this.data.suffix}`; + `${this.data.prefix}${this.decimals(this.currentValue)}${this.data.suffix}`; this.el.setAttribute('text', this.textValue); },