Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GammaJS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GSC Libraries
GammaJS
Commits
ce5a5980
Commit
ce5a5980
authored
7 years ago
by
Ben Galloway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More sensible returning of arrays
parent
87ac58f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
dist/util.js
dist/util.js
+3
-1
src/util.js
src/util.js
+3
-1
No files found.
dist/util.js
View file @
ce5a5980
...
...
@@ -82,7 +82,9 @@ const processAnyType = (anyType, methodSpecs) => {
},
{});
return
distilled
;
});
return
reduced
;
const
result
=
methodSpecs
.
returnType
===
false
&&
reduced
.
length
===
1
?
reduced
[
0
]
:
reduced
;
// Only return an array if necessary
return
result
;
};
const
parseResponse
=
exports
.
parseResponse
=
(
rawResult
,
methodSpecs
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/util.js
View file @
ce5a5980
...
...
@@ -79,7 +79,9 @@ const processAnyType = (anyType, methodSpecs) => {
},
{});
return
distilled
;
});
return
reduced
;
const
result
=
methodSpecs
.
returnType
===
false
&&
reduced
.
length
===
1
?
reduced
[
0
]
:
reduced
;
// Only return an array if necessary
return
result
;
};
export
const
parseResponse
=
(
rawResult
,
methodSpecs
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment