File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,17 +5,17 @@ export default class ContentstackCollection {
55 data . stackHeaders = stackHeaders
66 }
77 this . items = wrapperCollection ( http , data )
8- if ( response . data . schema !== undefined ) {
9- this . schema = response . data . schema
8+ if ( data . schema !== undefined ) {
9+ this . schema = data . schema
1010 }
11- if ( response . data . content_type !== undefined ) {
12- this . content_type = response . data . content_type
11+ if ( data . content_type !== undefined ) {
12+ this . content_type = data . content_type
1313 }
14- if ( response . data . count !== undefined ) {
15- this . count = response . data . count
14+ if ( data . count !== undefined ) {
15+ this . count = data . count
1616 }
17- if ( response . data . notice !== undefined ) {
18- this . notice = response . data . notice
17+ if ( data . notice !== undefined ) {
18+ this . notice = data . notice
1919 }
2020 }
2121}
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ export function Stack (http, data) {
3333 if ( this . management_token && this . management_token ) {
3434 this . stackHeaders . authorization = this . management_token
3535 }
36- delete this . api_key
3736 delete this . management_token
3837 /**
3938 * @description The Update stack call lets you update the name and description of an existing stack.
@@ -630,7 +629,8 @@ export function Stack (http, data) {
630629}
631630
632631export function StackCollection ( http , data ) {
633- const obj = cloneDeep ( data . stacks )
632+ const stacks = data . stacks || [ ]
633+ const obj = cloneDeep ( stacks )
634634 const stackCollection = obj . map ( ( userdata ) => {
635635 return new Stack ( http , { stack : userdata } )
636636 } )
You can’t perform that action at this time.
0 commit comments