Skip to content

Commit 365ab3a

Browse files
committed
Label test case
1 parent 82a8aad commit 365ab3a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/stack/label/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function Label (http, data) {
1616

1717
if (data.label) {
1818
Object.assign(this, cloneDeep(data.label))
19-
this.urlPath = `labels/${this.uid}`
19+
this.urlPath = `/labels/${this.uid}`
2020
/**
2121
* @description The Update label call is used to update an existing label.
2222
* @memberof Label
@@ -103,7 +103,7 @@ export function Label (http, data) {
103103
}
104104

105105
export function LabelCollection (http, data) {
106-
const obj = cloneDeep(data.labels)
106+
const obj = cloneDeep(data.labels) || []
107107
const labelCollection = obj.map((userdata) => {
108108
return new Label(http, { label: userdata, stackHeaders: data.stackHeaders })
109109
})

0 commit comments

Comments
 (0)