diff --git a/app/app.component.ts b/app/app.component.ts index 2085c5d8b..6986ddbfc 100644 --- a/app/app.component.ts +++ b/app/app.component.ts @@ -131,7 +131,7 @@ export class AppComponent implements OnInit, OnChanges { } else { this.urlShare.decryptUrl().then((data) => { - var decryptedData = data. data; + var decryptedData = data.data; if(decryptedData && decryptedData.config) { cb(decryptedData.config); } else { diff --git a/app/queryBlocks/singlequery/queries/match_phase_prefix.query.ts b/app/queryBlocks/singlequery/queries/match_phase_prefix.query.ts index 4c852a112..0b2479c58 100644 --- a/app/queryBlocks/singlequery/queries/match_phase_prefix.query.ts +++ b/app/queryBlocks/singlequery/queries/match_phase_prefix.query.ts @@ -92,7 +92,8 @@ export class Match_phase_prefixQuery implements OnInit, OnChanges { this.options = JSON.parse(JSON.stringify(this.default_options)); try { if(this.appliedQuery['match_phrase_prefix'][this.fieldName]) { - if (this.appliedQuery[this.current_query][this.fieldName]) { + if (this.appliedQuery[this.current_query][this.fieldName] + && typeof this.appliedQuery[this.current_query][this.fieldName] === 'object') { this.inputs.input.value = this.appliedQuery[this.current_query][this.fieldName].query; for (let option in this.appliedQuery[this.current_query][this.fieldName]) { if (option != 'query') { diff --git a/app/queryBlocks/singlequery/queries/match_phrase.query.ts b/app/queryBlocks/singlequery/queries/match_phrase.query.ts index 2e5ae3ff7..7d02b83f7 100644 --- a/app/queryBlocks/singlequery/queries/match_phrase.query.ts +++ b/app/queryBlocks/singlequery/queries/match_phrase.query.ts @@ -88,7 +88,8 @@ export class Match_phraseQuery implements OnInit, OnChanges { this.options = JSON.parse(JSON.stringify(this.default_options)); try { if (this.appliedQuery[this.current_query][this.selectedField]) { - if (this.appliedQuery[this.current_query][this.fieldName]) { + if (this.appliedQuery[this.current_query][this.fieldName] + && typeof this.appliedQuery[this.current_query][this.fieldName] === 'object') { this.inputs.input.value = this.appliedQuery[this.current_query][this.fieldName].query; for (let option in this.appliedQuery[this.current_query][this.fieldName]) { if (option != 'query') {