Skip to content

Commit

Permalink
fix: previous commit was not completed
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Nov 18, 2018
1 parent f3150e1 commit 924111c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export default {
const parts = this.q.split('&');
parts.forEach(part => {
const match = part.match(/^[a-zA-Z0-9_]+/);
if(match.length > 0) this.addFieldByName(match[0]);
if (match.length > 0) this.addFieldByName(match[0]);
});
},
Expand Down Expand Up @@ -319,14 +319,9 @@ export default {
// включить поле по имени
addFieldByName(name) {
console.log('addFieldByName: ', name);
const field = this.availableFields.find(field => field.name == name);
let index = this.fieldIndex(field);
if (index === -1){
console.log('field: ', field);
console.log('add field '+field.name);
this.fields.push(field);
}
if (index === -1) this.fields.push(field);
},
// устанавливает поля по массиву имен, сбрасывает предыдущие выбранные поля
Expand Down

0 comments on commit 924111c

Please sign in to comment.