[FIX] component: error handling: rendering with sub components

Closes #425
This commit is contained in:
Aaron Bohy
2019-10-30 11:35:28 +01:00
committed by aab-odoo
parent fa6801b523
commit 9e37b968e8
6 changed files with 41 additions and 13 deletions
+5
View File
@@ -1,5 +1,6 @@
import { VNode } from "../vdom/index";
import { Component } from "./component";
import { scheduler } from "./scheduler";
/**
* Owl Fiber Class
@@ -216,7 +217,11 @@ export class Fiber {
component.catchError!(error);
});
} else {
// the 3 next lines aim to mark the root fiber as being in error, and
// to force it to end, without waiting for its children
this.root.counter = 0;
this.root.error = error;
scheduler.flush();
root.destroy();
}
}