From cde276a1efe39175bb35aa6cc09f1aaa00009c6d Mon Sep 17 00:00:00 2001 From: "Michael Mattiello (mcm)" Date: Fri, 27 Mar 2020 10:49:43 +0000 Subject: [REF] web: add missing features of abstract field This commit adds missing features of AbstractField written in owl. task id: 2193996 --- addons/web/static/src/js/core/utils.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'addons/web/static/src/js/core/utils.js') 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 @@ -445,6 +445,14 @@ var utils = { is_bin_size: function (v) { 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. * -- cgit v1.2.3