Fix eslint
This commit is contained in:
parent
e3395e3a9d
commit
8e3a52cfd6
1 changed files with 17 additions and 15 deletions
|
@ -13,7 +13,7 @@
|
||||||
conditions: [{
|
conditions: [{
|
||||||
keyword: 'none',
|
keyword: 'none',
|
||||||
url: 'assignee_id=0',
|
url: 'assignee_id=0',
|
||||||
}]
|
}],
|
||||||
}, {
|
}, {
|
||||||
key: 'milestone',
|
key: 'milestone',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
}, {
|
}, {
|
||||||
keyword: 'upcoming',
|
keyword: 'upcoming',
|
||||||
url: 'milestone_title=%23upcoming',
|
url: 'milestone_title=%23upcoming',
|
||||||
}]
|
}],
|
||||||
}, {
|
}, {
|
||||||
key: 'label',
|
key: 'label',
|
||||||
type: 'array',
|
type: 'array',
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
conditions: [{
|
conditions: [{
|
||||||
keyword: 'none',
|
keyword: 'none',
|
||||||
url: 'label_name[]=No+Label',
|
url: 'label_name[]=No+Label',
|
||||||
}]
|
}],
|
||||||
}];
|
}];
|
||||||
|
|
||||||
function clearSearch(e) {
|
function clearSearch(e) {
|
||||||
|
@ -48,11 +48,11 @@
|
||||||
function toggleClearSearchButton(e) {
|
function toggleClearSearchButton(e) {
|
||||||
const clearSearchButton = document.querySelector('.clear-search');
|
const clearSearchButton = document.querySelector('.clear-search');
|
||||||
|
|
||||||
if (event.target.value) {
|
if (e.target.value) {
|
||||||
clearSearchButton.classList.remove('hidden');
|
clearSearchButton.classList.remove('hidden');
|
||||||
} else {
|
} else {
|
||||||
clearSearchButton.classList.add('hidden');
|
clearSearchButton.classList.add('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadSearchParamsFromURL() {
|
function loadSearchParamsFromURL() {
|
||||||
|
@ -68,12 +68,13 @@
|
||||||
|
|
||||||
// Check if it matches edge conditions listed in validTokenKeys
|
// Check if it matches edge conditions listed in validTokenKeys
|
||||||
let conditionIndex = 0;
|
let conditionIndex = 0;
|
||||||
const validCondition = validTokenKeys.filter(v => v.conditions && v.conditions.filter((c, index) => {
|
const validCondition = validTokenKeys
|
||||||
if (c.url === p) {
|
.filter(v => v.conditions && v.conditions.filter((c, index) => {
|
||||||
conditionIndex = index;
|
if (c.url === p) {
|
||||||
}
|
conditionIndex = index;
|
||||||
return c.url === p;
|
}
|
||||||
})[0])[0];
|
return c.url === p;
|
||||||
|
})[0])[0];
|
||||||
|
|
||||||
if (validCondition) {
|
if (validCondition) {
|
||||||
inputValue += `${validCondition.key}:${validCondition.conditions[conditionIndex].keyword}`;
|
inputValue += `${validCondition.key}:${validCondition.conditions[conditionIndex].keyword}`;
|
||||||
|
@ -170,7 +171,8 @@
|
||||||
let tokenPath = '';
|
let tokenPath = '';
|
||||||
|
|
||||||
if (token.wildcard && match.conditions) {
|
if (token.wildcard && match.conditions) {
|
||||||
const condition = match.conditions.filter(c => c.keyword === token.value.toLowerCase())[0];
|
const condition = match.conditions
|
||||||
|
.filter(c => c.keyword === token.value.toLowerCase())[0];
|
||||||
|
|
||||||
if (condition) {
|
if (condition) {
|
||||||
tokenPath = `${condition.url}`;
|
tokenPath = `${condition.url}`;
|
||||||
|
|
Loading…
Reference in a new issue