[REF] fiber: small cleanups

This commit is contained in:
Géry Debongnie
2019-10-26 20:59:51 +02:00
committed by Aaron Bohy
parent 9cee12d7b4
commit 9779cd196c
2 changed files with 12 additions and 13 deletions
+4 -10
View File
@@ -148,7 +148,6 @@ export class Fiber {
};
this._walk(doWork);
let component: Component<any, any> = this.component;
this.shouldPatch = false;
const patchLen = patchQueue.length;
try {
for (let i = 0; i < patchLen; i++) {
@@ -161,14 +160,10 @@ export class Fiber {
} catch (e) {
console.error(e);
}
try {
for (let i = 0; i < patchLen; i++) {
const fiber = patchQueue[i];
component = fiber.component;
component.__patch(fiber.vnode);
}
} catch (e) {
this.handleError(e);
for (let i = 0; i < patchLen; i++) {
const fiber = patchQueue[i];
component = fiber.component;
component.__patch(fiber.vnode);
}
try {
for (let i = patchLen - 1; i >= 0; i--) {
@@ -181,7 +176,6 @@ export class Fiber {
} catch (e) {
console.error(e);
}
this.shouldPatch = true;
}
/**