summaryrefslogtreecommitdiff
path: root/addons/website/static
diff options
context:
space:
mode:
authorThanh Dodeur <tso@odoo.com>2020-09-14 09:20:24 +0000
committerThanh Dodeur <tso@odoo.com>2020-09-14 10:13:29 +0000
commit2c5b0c6b915546ccdac2ed4248f24a4e691fadd1 (patch)
tree4f53685ae780dbb6f65a3c85dae5a0b54854a336 /addons/website/static
parentd7af9b0769058ee91164b50313f9acc4ff5087fa (diff)
[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) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static')
-rw-r--r--addons/website/static/src/js/editor/snippets.options.js4
1 files changed, 3 insertions, 1 deletions
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;
+ }
},
//--------------------------------------------------------------------------