diff options
| author | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-03-27 10:49:43 +0000 |
|---|---|---|
| committer | Michael Mattiello (mcm) <mcm@odoo.com> | 2020-03-31 06:13:11 +0000 |
| commit | cde276a1efe39175bb35aa6cc09f1aaa00009c6d (patch) | |
| tree | a5c4c15d955ceed4b974497e9dd5ded449755d67 /addons/web/static/src/js/core/utils.js | |
| parent | 30f4f610bf146638b71a0b2a936f8ae9acef502e (diff) | |
[REF] web: add missing features of abstract field
This commit adds missing features of AbstractField written in owl.
task id: 2193996
Diffstat (limited to 'addons/web/static/src/js/core/utils.js')
| -rw-r--r-- | addons/web/static/src/js/core/utils.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core/utils.js b/addons/web/static/src/js/core/utils.js index 93e9bda5593..f1d4b00c6a9 100644 --- a/addons/web/static/src/js/core/utils.js +++ b/addons/web/static/src/js/core/utils.js @@ -446,6 +446,14 @@ var utils = { return (/^\d+(\.\d*)? [^0-9]+$/).test(v); }, /** + * Checks if a class is an extension of owl.Component. + * + * @param {any} value A class reference + */ + isComponent: function (value) { + return value.prototype instanceof owl.Component; + }, + /** * Returns whether the given anchor is valid. * * This test is useful to prevent a crash that would happen if using an invalid |
