alert_words: Remove the page_params.alert_words after initialization.

We remove the `page_params.alert_words` since `alert_words.words`
is the sole source of alert words. Use of `page_params.alert_words`
could lead to bugs when alert words are updated since it is not updated.
This commit is contained in:
Harshit Bansal
2017-06-11 18:51:11 +05:30
committed by Tim Abbott
parent 0e25634934
commit d5ab8ac1e1
2 changed files with 5 additions and 2 deletions

View File

@@ -4,6 +4,9 @@ var exports = {};
exports.words = page_params.alert_words;
// Delete the `page_params.alert_words` since we are its sole user.
delete page_params.alert_words;
// escape_user_regex taken from jquery-ui/autocomplete.js,
// licensed under MIT license.
function escape_user_regex(value) {