-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(frontend): get_list_block_sieve function not callable if sievefilters module… #1435
base: master
Are you sure you want to change the base?
fix(frontend): get_list_block_sieve function not callable if sievefilters module… #1435
Conversation
modules/sievefilters/site.js
Outdated
@@ -977,6 +977,26 @@ function sieveFiltersPageHandler() { | |||
}); | |||
} | |||
|
|||
function get_list_block_sieve() { | |||
sessionStorage.removeItem('list_blocked'); | |||
var detail = Hm_Utils.parse_folder_path(hm_list_path()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You should avoid using
var
at all costs because it can lead to unintended global variable pollution. hm_list_path()
andhm_page_name()
are deprecated and do not always guarantee accurate results. Utility functions in modules/core/navigation/utils.js should be used instead.- What happens to the code calling
get_list_block_sieve()
when the module is disabled? - Did the pull request title miss something, and why does it use the tag
other
? Shouldn'tfrontend
be appropriate as the tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The objective is to getthe list of blocked addresses, when the mobule is deactivated, nothing happens, i.e. the function no longer get this list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the module is deactivated, get_list_block_sieve
will be undefined, thus, get_list_block_sieve()
will throw an error in the handler function.
c1d6a36
to
2551331
Compare
It looks like some words are being truncated in your pull request title. Make sure to expand the title fully so that all words are visible. If necessary, you can edit the title to be more concise while still conveying the full meaning. |
Also, please test every change you make. Does the current code still produce the intended behavior? |
issue