Skip to content

Commit

Permalink
Fix #47 match_phrase and match_phrase_prefix query state resolving is…
Browse files Browse the repository at this point in the history
…sues
  • Loading branch information
metagrover committed Feb 8, 2018
1 parent e6a23a2 commit 901354f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
3 changes: 2 additions & 1 deletion app/queryBlocks/singlequery/queries/match_phrase.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 901354f

Please sign in to comment.