DuyTa's picture
Upload folder using huggingface_hub
bc20498 verified
import { onDestroy, onMount } from 'svelte';
export const safeOnMount = (fn) => {
try {
onMount(fn);
}
catch {
return fn;
}
};
export const safeOnDestroy = (fn) => {
try {
onDestroy(fn);
}
catch {
return fn;
}
};