Skip to content

Commit

Permalink
fix: sync subtree
Browse files Browse the repository at this point in the history
  • Loading branch information
reves committed Feb 10, 2024
1 parent f2698fe commit 0733589
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/ui/Fiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0733589

Please sign in to comment.