mirror of https://github.com/zulip/zulip.git
widgetize: Don't warn for deleted tictactoe widget.
This commit is contained in:
parent
909b484d64
commit
d9b14b5b74
|
@ -135,6 +135,13 @@ run_test("activate", () => {
|
|||
assert(!is_event_handled);
|
||||
assert.equal(blueslip.get_test_logs("warn")[0].more_info, "invalid_widget");
|
||||
|
||||
opts.widget_type = "tictactoe";
|
||||
|
||||
widgetize.activate(opts);
|
||||
assert(!is_widget_elem_inserted);
|
||||
assert(!is_widget_activated);
|
||||
assert(!is_event_handled);
|
||||
|
||||
/* Testing widgetize.handle_events */
|
||||
const post_activate_event = {
|
||||
data: {
|
||||
|
|
|
@ -25,6 +25,9 @@ exports.activate = function (in_opts) {
|
|||
events.shift();
|
||||
|
||||
if (!widgets.has(widget_type)) {
|
||||
if (widget_type === "tictactoe") {
|
||||
return; // don't warn for deleted legacy widget
|
||||
}
|
||||
blueslip.warn("unknown widget_type", widget_type);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue