Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web_search_date_range/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Web Search Date Range",
"version": "1.0.1",
"version": "1.0.2",
"author": "Numigi",
"maintainer": "Numigi",
"website": "https://numigi.com/r/home",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@
}

toggleFilterWithOptions(filterId, optionId) {
const filter = this.state.filters[filterId];
var filter = this.state.filters[filterId];
if(filter === undefined){

Check warning on line 54 in web_search_date_range/static/src/js/control_panel_model_extension.js

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

web_search_date_range/static/src/js/control_panel_model_extension.js#L54

Unexpected use of undefined.
filterId = filterId - 1
filter = this.state.filters[filterId];
}

if (!filter.isRelativeDateFilter) {
return super.toggleFilterWithOptions(filterId, optionId)
}
Expand All @@ -62,6 +67,9 @@
if (index >= 0) {
this.state.query.splice(index, 1);
} else {
if(filter.id !== filterId){
filter.id = filter.id - 1;
}
this.state.query.push({ groupId: filter.groupId, filterId, optionId });
}
}
Expand Down
Loading