diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-25 14:34:18 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-25 14:34:18 +0200 |
| commit | 37eed7c509fb5846c89ef37046df4b3cab299719 (patch) | |
| tree | f84141132c09ddafa7922375a84d5bf072265d04 /addons/web_editor/static/src/js | |
| parent | 943075fd94eec2bc61b751e8828e3bd69054b2f8 (diff) | |
| parent | 58e35522468d1d4c0674518f785a32be56d2c1a2 (diff) | |
[MERGE] forward port branch saas-11.2 up to 58e35522468
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/widgets.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index f7c1c808016..b63568ff0bd 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -373,13 +373,13 @@ var ImageWidget = MediaWidget.extend({ .sortBy(function (r) { if (_.any(self.firstFilters, function (filter) { var regex = new RegExp(filter, 'i'); - return r.name.match(regex) || r.datas_fname.match(regex); + return r.name.match(regex) || r.datas_fname && r.datas_fname.match(regex); })) { return -1; } if (_.any(self.lastFilters, function (filter) { var regex = new RegExp(filter, 'i'); - return r.name.match(regex) || r.datas_fname.match(regex); + return r.name.match(regex) || r.datas_fname && r.datas_fname.match(regex); })) { return 1; } |
