diff options
| -rw-r--r-- | addons/event_sale/static/src/js/event_configurator_widget.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/event_sale/static/src/js/event_configurator_widget.js b/addons/event_sale/static/src/js/event_configurator_widget.js index 5bbdb3e7033..eff0edd3a99 100644 --- a/addons/event_sale/static/src/js/event_configurator_widget.js +++ b/addons/event_sale/static/src/js/event_configurator_widget.js @@ -32,7 +32,7 @@ ProductConfiguratorWidget.include({ _onProductChange: function (productId, dataPointId) { var self = this; return this._super.apply(this, arguments).then(function (stopPropagation) { - if (stopPropagation) { + if (stopPropagation || productId === undefined) { return Promise.resolve(true); } else { return self._checkForEvent(productId, dataPointId); @@ -56,7 +56,7 @@ ProductConfiguratorWidget.include({ method: 'read', args: [productId, ['event_ok']], }).then(function (result) { - if (result && result[0].event_ok) { + if (Array.isArray(result) && result.length && result[0].event_ok) { self._openEventConfigurator({ default_product_id: productId }, |
