forked from loafle/openapi-generator-original
fix array of enum class in JS (#1484)
This commit is contained in:
@@ -478,8 +478,8 @@ class ApiClient {
|
||||
if (type === Object) {
|
||||
// generic object, return directly
|
||||
return data;
|
||||
} else if (typeof type === 'function') {
|
||||
// for model type like: User
|
||||
} else if (typeof type.constructFromObject === 'function') {
|
||||
// for model type like User and enum class
|
||||
return type.constructFromObject(data);
|
||||
} else if (Array.isArray(type)) {
|
||||
// for array type like: ['String']
|
||||
|
||||
Reference in New Issue
Block a user