diff --git a/app/static/js/CorpusAnalysis/QueryBuilder.js b/app/static/js/CorpusAnalysis/QueryBuilder.js index ef7d96f1..c35e9e90 100644 --- a/app/static/js/CorpusAnalysis/QueryBuilder.js +++ b/app/static/js/CorpusAnalysis/QueryBuilder.js @@ -485,7 +485,7 @@ class ConcordanceQueryBuilder { let tokenQueryContent = ''; //for ButtonFactory(prettyQueryText) let tokenQueryText = ''; //for ButtonFactory(queryText) this.elements.cancelBool = false; - let tokenIsEmpty = true; + let tokenIsEmpty = false; if (this.elements.ignoreCase.checked) { c = ' %c'; @@ -497,8 +497,8 @@ class ConcordanceQueryBuilder { for (let element of this.elements.tokenQuery.childNodes) { tokenQueryContent += ' ' + element.firstChild.data + ' '; tokenQueryText += decodeURI(element.dataset.tokentext); - if (element.innerTe8888xt.indexOf('empty token') !== -1) { - emptyTokenCheck = false; + if (element.innerText.indexOf('empty token') !== -1) { + tokenIsEmpty = true; } } @@ -561,6 +561,7 @@ class ConcordanceQueryBuilder { if (tokenIsEmpty === false) { tokenQueryText = '[' + tokenQueryText + ']'; } + console.log(tokenQueryText); this.queryChipFactory('token', tokenQueryContent, tokenQueryText); this.hideEverything(); this.elements.positionalAttrArea.classList.add('hide'); diff --git a/app/templates/corpora/analyse_corpus.concordance.html.j2 b/app/templates/corpora/analyse_corpus.concordance.html.j2 index e19a3728..56baf07d 100644 --- a/app/templates/corpora/analyse_corpus.concordance.html.j2 +++ b/app/templates/corpora/analyse_corpus.concordance.html.j2 @@ -6,7 +6,7 @@