summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/core/utils.js')
-rw-r--r--addons/web/static/src/js/core/utils.js8
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