diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-22 17:47:32 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-22 17:47:32 +0100 |
| commit | fa1f2132e79f2ac2314a8b417d5d35d6571bd41b (patch) | |
| tree | 3789a8335dd5089998de3c5c6a391b2d95a85187 /addons/web/static/src/js/fields/field_utils.js | |
| parent | db27489fe756b24647e993a22340705625839698 (diff) | |
| parent | 950d9b2369046f2e3199d144df8edbd0e63f8a2f (diff) | |
[MERGE] forward port branch 11.0 up to 950d9b23690
Diffstat (limited to 'addons/web/static/src/js/fields/field_utils.js')
| -rw-r--r-- | addons/web/static/src/js/fields/field_utils.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/field_utils.js b/addons/web/static/src/js/fields/field_utils.js index 5ac180b1de1..5a11f1b0ba8 100644 --- a/addons/web/static/src/js/fields/field_utils.js +++ b/addons/web/static/src/js/fields/field_utils.js @@ -30,7 +30,7 @@ var _t = core._t; /** * Convert binary to bin_size * - * @param {string} value base64 representation of the binary (might be already a bin_size!) + * @param {string} [value] base64 representation of the binary (might be already a bin_size!) * @param {Object} [field] * a description of the field (note: this parameter is ignored) * @param {Object} [options] additional options (note: this parameter is ignored) @@ -38,6 +38,9 @@ var _t = core._t; * @returns {string} bin_size (which is human-readable) */ function formatBinary(value, field, options) { + if (!value) { + return ''; + } return utils.binaryToBinsize(value); } |
