Error load
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
|
||||
export const dva = {
|
||||
config: {
|
||||
onError(err: ErrorEvent) {
|
||||
onError(err: ErrorEvent | any) {
|
||||
err.preventDefault();
|
||||
// tslint:disable-next-line: no-console
|
||||
console.error(err.message);
|
||||
if (err.name === 'ChunkLoadError') {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user