This commit is contained in:
Rizky 2024-07-12 18:57:38 +07:00
parent a2fe29da7a
commit 58ce3642bb
5 changed files with 17 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -25,6 +25,9 @@ export const loadApiProxyDef = async (_url: string, with_types: boolean) => {
} else {
script.src = `${base}/_prasi/load.js?url=${url}&v3&ts=${ts}`;
}
script.onerror = () => {
done();
};
if (!document.querySelector(`script[src="${script.src}"]`)) {
d.body.appendChild(script);

View File

@ -184,7 +184,10 @@ export const fetchSendDb = async (params: any, dburl: string) => {
return result;
}
} catch (e) {
console.error("DBQuery failed:", result);
if (result) {
console.error("DBQuery failed:", result);
}
return null;
}
}

View File

@ -179,6 +179,10 @@ export const EdPropInstanceOptions: FC<{
if (res instanceof Promise) {
res.then(metaFnCallback).catch((e) => {
console.error(
`ERROR in component ${meta.item.name}, prop ${name}:`
);
console.error(local.metaFn?.toString());
console.error(e);
});
} else metaFnCallback(res);

View File

@ -101,6 +101,10 @@ const injectSiteScript = () => {
} else {
script.src = `${base_url}/_prasi/load.js?url=${base_url}&v3&ts=${ts}`;
}
script.onerror = () => {
done();
};
if (!document.querySelector(`script[src="${script.src}"]`)) {
d.body.appendChild(script);