Skip to content

Commit 777d777

Browse files
committed
Delivery token and Locale test case
1 parent e92ed69 commit 777d777

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/stack/deliveryToken/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function DeliveryToken (http, data = {}) {
101101
}
102102

103103
export function DeliveryTokenCollection (http, data) {
104-
const obj = cloneDeep(data.tokens)
104+
const obj = cloneDeep(data.tokens) || []
105105
const deliveryTokenCollection = obj.map((userdata) => {
106106
return new DeliveryToken(http, { token: userdata, stackHeaders: data.stackHeaders })
107107
})

lib/stack/locale/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function Locale (http, data = {}) {
9898
}
9999

100100
export function LocaleCollection (http, data) {
101-
const obj = cloneDeep(data.locales)
101+
const obj = cloneDeep(data.locales) || []
102102
const localeCollection = obj.map((userdata) => {
103103
return new Locale(http, { locale: userdata, stackHeaders: data.stackHeaders })
104104
})

0 commit comments

Comments
 (0)