Mobile console debugging
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user