hack to remove lit dev mode warning

This commit is contained in:
Niels Lyngsø
2023-11-10 14:52:57 +01:00
parent 422b65357d
commit 43855d616b

View File

@@ -140,6 +140,16 @@ export default {
</head>
<body>
<script type="module" src="${testFramework}"></script>
<script type="module">
<!-- Hack to disable Lit dev mode warnings -->
const systemWarn = window.console.warn;
window.console.warn = (...args) => {
if (args[0].indexOf('Lit is in dev mode.') === 0) {
return;
}
systemWarn(...args);
};
</script>
<script type="module">
import 'element-internals-polyfill';
import '@umbraco-ui/uui';