This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new efe204a  Fix extra +
efe204a is described below

commit efe204a44f15363d51c54cbb867f1f24899a04ec
Author: Bertrand Delacretaz <bdelacre...@apache.org>
AuthorDate: Wed May 27 13:13:04 2020 +0200

    Fix extra +
---
 .../SLING-INF/initial-content/apps/samples/article/article.html      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/apps/samples/article/article.html
 
b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/apps/samples/article/article.html
index 198a29c..973fcb5 100644
--- 
a/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/apps/samples/article/article.html
+++ 
b/org.apache.sling.graphql.samples.website/src/main/resources/SLING-INF/initial-content/apps/samples/article/article.html
@@ -41,7 +41,10 @@
               var template = Handlebars.compile($("#content").html());
               result.data.article.tagsQuery = "";
               for(i in result.data.article.tags) {
-                result.data.article.tagsQuery += result.data.article.tags[i] + 
"+";
+                if(result.data.article.tagsQuery.length > 0) {
+                  result.data.article.tagsQuery +="+";
+                }
+                result.data.article.tagsQuery += result.data.article.tags[i];
               }
               $("#content").html(template({ article : result.data.article }));
             }

Reply via email to