Skip to content

Commit 21ae9b0

Browse files
committed
Asset test case
1 parent 171323f commit 21ae9b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/stack/asset/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function Asset (http, data = {}) {
2525

2626
if (data.asset) {
2727
Object.assign(this, cloneDeep(data.asset))
28-
this.urlPath = `assets/${this.uid}`
28+
this.urlPath = `/assets/${this.uid}`
2929

3030
/**
3131
* @description The Update Asset call lets you update the name and description of an existing Asset.
@@ -223,7 +223,7 @@ export function Asset (http, data = {}) {
223223
}
224224

225225
export function AssetCollection (http, data) {
226-
const obj = cloneDeep(data.assets)
226+
const obj = cloneDeep(data.assets) || []
227227
const assetCollection = obj.map((userdata) => {
228228
return new Asset(http, { asset: userdata, stackHeaders: data.stackHeaders })
229229
})

0 commit comments

Comments
 (0)