Skip to content
Snippets Groups Projects
Commit 13944b6d authored by Aaron Bohy's avatar Aaron Bohy
Browse files

[FIX] web: call do_hide/do_show on a destroyed widget


Before this commit, calling do_hide/do_show/do_toggle on a
widget that had been destroyed before being rendered crashed
(because this.$el was undefined).

Obviously, calling those methods in this situation is useless, but
with asynchronous code, it might happen that you call them in an
handler, and they have been destroyed meanwhile.

This commit checks if this.$el is set before accessing it to avoid
the crash.

closes odoo/odoo#65885

X-original-commit: 320c29f5
Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
parent 74311c75
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment