wip fix
This commit is contained in:
parent
814c709814
commit
70766c4ea1
File diff suppressed because one or more lines are too long
|
|
@ -167,7 +167,7 @@ export const viEvalScript = (
|
||||||
try {
|
try {
|
||||||
${src}
|
${src}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.warn("Error at item ${meta.item.name}:", ${meta.item.adv?.js});
|
console.warn("Error at item ${meta.item.name}:", \`${meta.item.adv?.js}\`);
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,16 @@ type PRELOAD = Exclude<VG["on_preload"], undefined>;
|
||||||
type PRELOAD_ARGS = Parameters<PRELOAD>[0];
|
type PRELOAD_ARGS = Parameters<PRELOAD>[0];
|
||||||
|
|
||||||
const w = window as any;
|
const w = window as any;
|
||||||
|
|
||||||
|
if (!w.prasi_error_handler) {
|
||||||
|
w.prasi_error_handler = true;
|
||||||
|
window.addEventListener("error", (errorEvent) => {
|
||||||
|
const { lineno, colno } = errorEvent;
|
||||||
|
console.log(`Error thrown at: ${lineno}:${colno}`);
|
||||||
|
errorEvent.preventDefault();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export const Vi: FC<{
|
export const Vi: FC<{
|
||||||
meta: Record<string, IMeta>;
|
meta: Record<string, IMeta>;
|
||||||
mode: "mobile" | "desktop";
|
mode: "mobile" | "desktop";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue