Skip to content

Commit 38cd47f

Browse files
committed
Fix reactivity systems not picking up when new properties are added
1 parent 0d0eec1 commit 38cd47f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fix reactivity systems not picking up when new properties are added
13+
1014
## [0.2.0-beta.8] - 2024-12-09
1115

1216
### Fixed

src/model.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class ModelBase<
5555
return;
5656
}
5757

58+
(this as any)[name] = null;
59+
5860
Object.defineProperty(this, name, {
5961
get: () => this.attributes[name],
6062
configurable: true,
@@ -80,6 +82,8 @@ class ModelBase<
8082
return;
8183
}
8284

85+
(this as any)[name] = null;
86+
8387
Object.defineProperty(this, name, {
8488
get: () => this.getRelationship(name),
8589
configurable: true,

0 commit comments

Comments
 (0)