diff --git a/static/js/alert_words.js b/static/js/alert_words.js index e5a9045f90..4b135828ad 100644 --- a/static/js/alert_words.js +++ b/static/js/alert_words.js @@ -3,6 +3,9 @@ var alert_words = (function () { var exports = {}; exports.words = page_params.alert_words; +exports.set_words = function (value) { + exports.words = value; +}; // Delete the `page_params.alert_words` since we are its sole user. delete page_params.alert_words; diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js index a3fa46202d..4b780fbf53 100644 --- a/static/js/server_events_dispatch.js +++ b/static/js/server_events_dispatch.js @@ -6,7 +6,7 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) { var noop = function () {}; switch (event.type) { case 'alert_words': - alert_words.words = event.alert_words; + alert_words.set_words(event.alert_words); alert_words_ui.render_alert_words_ui(); break;