Skip to content

Commit e7752d5

Browse files
committed
fix: exclude stackHeaders from entry data assignment
add cloneDeep
1 parent 26da7a6 commit e7752d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/stack/contentType/entry/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export function Entry (http, data) {
2929
if (this.apiVersion && !this.stackHeaders.api_version) {
3030
this.stackHeaders.api_version = this.apiVersion;
3131
}
32-
Object.assign(this, cloneDeep(data.entry))
32+
const { stackHeaders, ...entryData } = data.entry;
33+
Object.assign(this, cloneDeep(entryData));
3334
this.urlPath = `/content_types/${this.content_type_uid}/entries/${this.uid}`
3435

3536
/**

0 commit comments

Comments
 (0)