mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Mobile console debugging
This commit is contained in:
parent
ed8011f792
commit
23adfb2ef0
2 changed files with 8 additions and 4 deletions
|
@ -6,10 +6,6 @@ export default class extends Controller {
|
|||
static targets = ["panel", "navBtn"];
|
||||
static values = { urlParamKey: String };
|
||||
|
||||
connect() {
|
||||
console.log("tabs controller connected");
|
||||
}
|
||||
|
||||
show(e) {
|
||||
const btn = e.target.closest("button");
|
||||
const selectedTabId = btn.dataset.id;
|
||||
|
|
|
@ -5,3 +5,11 @@ import "controllers";
|
|||
Turbo.StreamActions.redirect = function () {
|
||||
Turbo.visit(this.target);
|
||||
};
|
||||
|
||||
if (typeof console !== "undefined") {
|
||||
console.debug = console.log;
|
||||
window.onerror = (msg, url, line) => {
|
||||
console.log(`Error: ${msg}\nURL: ${url}\nLine: ${line}`);
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue