Skip to content

Commit a8df8ef

Browse files
authored
Merge pull request #7256 from QwikDev/fix-demo
fix: docs demo silent in-browser crash
2 parents 122f2a8 + d9371de commit a8df8ef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/docs/src/routes/demo/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function logQSymbols() {
3030
}
3131
console.info('QSymbol', symbol);
3232
});
33-
function interceptLogFn(name: 'debug' | 'error' | 'info' | 'log' | 'warn') {
33+
for (const name of ['debug', 'error', 'info', 'log', 'warn'] as const) {
3434
const delegate = console[name];
3535
console[name] = function (...args: any[]) {
3636
const li = document.createElement('li');
@@ -53,5 +53,4 @@ function logQSymbols() {
5353
return delegate.apply(console, args);
5454
};
5555
}
56-
(['debug', 'error', 'info', 'log', 'warn'] as const).forEach(interceptLogFn);
5756
}

0 commit comments

Comments
 (0)