Skip to content

Commit

Permalink
Fix Javascript error in View Issue page
Browse files Browse the repository at this point in the history
When there are no saved filters, 'source_query_id' is not defined, so
check for that and return to avoid the error.

Fixes #27704
  • Loading branch information
dregad committed Dec 30, 2020
1 parent b2da735 commit 3556818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/bugFilter.js
Expand Up @@ -93,8 +93,8 @@ function filter_named_filter_clean() {

function filter_named_filter_dirty() {
var stored_query_id = $('[name=source_query_id]').val();
if( stored_query_id == -1 ) {
/* Only make it dirty if it's a stored filter */
if( typeof stored_query_id === 'undefined' || stored_query_id == -1 ) {
/* Only make it dirty if any filters exist, and it's a stored filter */
return;
}
/* stored query in filter is tainted */
Expand Down

0 comments on commit 3556818

Please sign in to comment.