Skip to content

Commit

Permalink
Merge pull request #7256 from QwikDev/fix-demo
Browse files Browse the repository at this point in the history
fix: docs demo silent in-browser crash
  • Loading branch information
wmertens authored Jan 15, 2025
2 parents 122f2a8 + d9371de commit a8df8ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/docs/src/routes/demo/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function logQSymbols() {
}
console.info('QSymbol', symbol);
});
function interceptLogFn(name: 'debug' | 'error' | 'info' | 'log' | 'warn') {
for (const name of ['debug', 'error', 'info', 'log', 'warn'] as const) {
const delegate = console[name];
console[name] = function (...args: any[]) {
const li = document.createElement('li');
Expand All @@ -53,5 +53,4 @@ function logQSymbols() {
return delegate.apply(console, args);
};
}
(['debug', 'error', 'info', 'log', 'warn'] as const).forEach(interceptLogFn);
}

0 comments on commit a8df8ef

Please sign in to comment.