Skip to content

Commit aa6d6be

Browse files
Default embedded entity properties (#20)
1 parent ce184e6 commit aa6d6be

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.6.2]
8+
9+
### Fixed
10+
11+
- `EmbeddedEntity`'s `properties` now default to an empty object ([#19](https://github.com/siren-js/client/issues/19))
12+
713
## [0.6.1]
814

915
### Fixed
@@ -88,6 +94,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
8894
- `submit()` method for submitting actions; currently, only actions whose `type` is `"application/x-www-form-urlencoded"` are supported.
8995
- Client `Response` wrapper for parsing Siren responses
9096

97+
[0.6.2]: https://github.com/siren-js/client/compare/v0.6.1...v0.6.2
9198
[0.6.1]: https://github.com/siren-js/client/compare/v0.6.0...v0.6.1
9299
[0.6.0]: https://github.com/siren-js/client/compare/v0.5.0...v0.6.0
93100
[0.5.0]: https://github.com/siren-js/client/compare/v0.4.0...v0.5.0

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@siren-js/client",
3-
"version": "0.5.0",
3+
"version": "0.0.0",
44
"description": "Client class for communicating with Siren APIs",
55
"files": [
66
"/dist"

src/models/embedded-entity.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class EmbeddedEntity<T extends object = object> {
5151
*/
5252
@IsObject()
5353
@IsOptional()
54-
properties?: T;
54+
properties: T = {} as T;
5555

5656
/**
5757
* List of strings describing the relationship of the `EmbeddedEntity` to its parent, per [RFC 8288](https://tools.ietf.org/html/rfc8288).

0 commit comments

Comments
 (0)