@effect-tui/react 0.12.2 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-tui/react",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "React bindings for @effect-tui/core",
5
5
  "type": "module",
6
6
  "files": [
@@ -83,7 +83,7 @@
83
83
  "prepublishOnly": "bun run typecheck && bun run build"
84
84
  },
85
85
  "dependencies": {
86
- "@effect-tui/core": "^0.12.2",
86
+ "@effect-tui/core": "^0.12.3",
87
87
  "@effect/platform": "^0.94.0",
88
88
  "@effect/platform-bun": "^0.87.0",
89
89
  "@effect/rpc": "^0.73.0",
package/src/hosts/base.ts CHANGED
@@ -342,6 +342,10 @@ export abstract class BaseHost implements HostInstance {
342
342
  }
343
343
 
344
344
  insertBefore(child: HostInstance, before: HostInstance): void {
345
+ const existingIdx = this.children.indexOf(child)
346
+ if (existingIdx >= 0) {
347
+ this.children.splice(existingIdx, 1)
348
+ }
345
349
  const idx = this.children.indexOf(before)
346
350
  if (idx >= 0) {
347
351
  this.children.splice(idx, 0, child)