|
|
@ -46,7 +46,11 @@ class CustomCategoryRepository { |
|
|
|
return global.alert(e) |
|
|
|
} |
|
|
|
|
|
|
|
if (Object.is(data) && !('name' in data)) { |
|
|
|
if (data && typeof data !== 'object') { |
|
|
|
callback(new Error('Data can not be parsed into an object')) |
|
|
|
} |
|
|
|
|
|
|
|
if (!data.name) { |
|
|
|
data.name = 'Custom ' + id.substr(0, 6) |
|
|
|
} |
|
|
|
|
|
|
@ -358,6 +362,10 @@ function customCategoryTest (value) { |
|
|
|
return e |
|
|
|
} |
|
|
|
|
|
|
|
if (!data || typeof data !== 'object') { |
|
|
|
return new Error('Data can not be parsed into an object') |
|
|
|
} |
|
|
|
|
|
|
|
const fields = ['feature', 'memberFeature'] |
|
|
|
for (let i1 = 0; i1 < fields.length; i1++) { |
|
|
|
const k1 = fields[i1] |
|
|
|