File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Fixed
11
+
12
+ - Fix falsy attribute values not being returned
13
+
10
14
## [ 0.2.0-beta.4] - 2024-10-01
11
15
12
16
### Changed
Original file line number Diff line number Diff line change @@ -96,11 +96,11 @@ export class Store<Schemas extends SchemaCollection = {}> {
96
96
return new Proxy ( new ModelClass ( data ) , {
97
97
get : ( target , prop , receiver ) => {
98
98
if ( typeof prop === 'string' ) {
99
- if ( target . attributes ?. [ prop ] ) {
99
+ if ( target . attributes ?. [ prop ] !== undefined ) {
100
100
return target . attributes [ prop ] ;
101
101
}
102
102
const data = target . relationships ?. [ prop ] ?. data ;
103
- if ( data ) {
103
+ if ( data !== undefined ) {
104
104
return Array . isArray ( data )
105
105
? this . find ( data )
106
106
: this . find ( data ) ;
You can’t perform that action at this time.
0 commit comments