diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js index b6208df272d..ebd063d7360 100644 --- a/addons/web/static/src/js/chrome/view_manager.js +++ b/addons/web/static/src/js/chrome/view_manager.js @@ -53,7 +53,8 @@ var ViewManager = Widget.extend(ControlPanelMixin, { */ on_attach_callback: function() { this.is_in_DOM = true; - if (this.active_view && this.active_view.controller.on_attach_callback) { + var controller = this.active_view && this.active_view.controller; + if (controller && this.active_view.controller.on_attach_callback) { this.active_view.controller.on_attach_callback(); } },