diff --git a/mesop/web/src/shell/shell.ng.html b/mesop/web/src/shell/shell.ng.html
index 1eac126b7..ba51c1199 100644
--- a/mesop/web/src/shell/shell.ng.html
+++ b/mesop/web/src/shell/shell.ng.html
@@ -1,6 +1,5 @@
-@for(error of this.errors; track $index) {
-}
+
{
const errorProto = new ServerError();
errorProto.setException(`JS Error: ${error.toString()}`);
- this.errors.push(errorProto);
+ this.error = errorProto;
});
}
@@ -67,12 +67,13 @@ export class Shell {
onRender: (rootComponent, componentConfigs) => {
this.rootComponent = rootComponent;
this.componentConfigs = componentConfigs;
+ this.error = undefined;
},
onNavigate: (route) => {
this.router.navigateByUrl(route);
},
onError: (error) => {
- this.errors.push(error);
+ this.error = error;
},
});
}