Commit 358a4342 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

fixed a bug in the text-range page where users could not pass the final check

parent 124a0db5
{
"name": "mc_frontend",
"version": "0.6.8",
"version": "0.6.9",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
......
......@@ -155,6 +155,8 @@ export class TextRangePage {
checkTextRange(citationLabelsStart: string[], citationLabelsEnd: string[]) {
return new Promise(resolve => {
citationLabelsStart = citationLabelsStart.filter(x => x);
citationLabelsEnd = citationLabelsEnd.filter(x => x);
if (this.corpusService.currentCorpus.citation_level_2 === CitationLevel[CitationLevel.default]) {
if (citationLabelsStart.length !== 1 || citationLabelsEnd.length !== 1) {
resolve(false);
......@@ -335,10 +337,10 @@ export class TextRangePage {
}
}).then(() => {
if ([2, 3, 5, 6].includes(this.currentInputId)) {
const baseCit: Citation = this.corpusService.currentCorpus.citations[relTextRangePart[0]];
const relCit: Citation = baseCit.subcitations[relTextRangePart[1]];
if (relTextRangePart[1] && !(relCit && Object.keys(relCit.subcitations).length)) {
const hasLvl3: boolean = this.corpusService.currentCorpus.citation_level_3 != CitationLevel[CitationLevel.default];
if (relTextRangePart[1] && !(relCit && Object.keys(relCit.subcitations).length) && hasLvl3) {
this.addReferences(this.corpusService.currentCorpus.citation_level_3, [baseCit, relCit]).then();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment