From 0733589f6ffb08e5cedf0a96a595db0e97b16d9f Mon Sep 17 00:00:00 2001 From: Constantin Miron Date: Sun, 11 Feb 2024 00:44:49 +0200 Subject: [PATCH] fix: sync subtree --- package.json | 2 +- src/ui/Fiber.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 773c85f..aa02a72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fley", - "version": "1.0.3", + "version": "1.0.4", "description": "Concurrent frontend JavaScript framework", "keywords": [ "i18n", "hooks", "virtual-dom", "router", "reconciliation", "jsx", "ssr", "concurrency", "api-client", "hydration", "frontend-framework", "fiber", "react-like", "global-state" diff --git a/src/ui/Fiber.js b/src/ui/Fiber.js index 2e8b6cb..8d5e88f 100644 --- a/src/ui/Fiber.js +++ b/src/ui/Fiber.js @@ -22,7 +22,7 @@ export default class Fiber { this.sibling = null this.child = null this.isSvg = parent?.isSvg || this.type === 'svg' - this.sync = false + this.sync = parent?.sync || false this.actual = [this] // ref to the latest cloned version // Reconciliation @@ -66,7 +66,7 @@ export default class Fiber { // Create a clone const fiber = new Fiber(element ?? this, this.node, parent, toReplace) - fiber.sync = this.sync || parent?.sync + fiber.sync = this.sync fiber.actual = this.actual // Reconciliation