From 2c5b0c6b915546ccdac2ed4248f24a4e691fadd1 Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Mon, 14 Sep 2020 09:20:24 +0000 Subject: [FIX] website: fix google map snippet traceback before this commit, when selectioning the snippet with an invalid API key, a traceback was triggered and the snippet was destroyed. task-2338730 closes odoo/odoo#57615 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/js/editor/snippets.options.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'addons/website/static/src/js/editor/snippets.options.js') diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index 028bbdb4963..082f6cba958 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -316,7 +316,9 @@ const GPSPicker = InputUserValueWidget.extend({ } }); }); - this.inputEl.value = this._gmapPlace.formatted_address; + if (this._gmapPlace) { + this.inputEl.value = this._gmapPlace.formatted_address; + } }, //-------------------------------------------------------------------------- -- cgit v1.2.3