Skip to content

Fix the type error #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/plugins/leetcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ function formatResult(result) {
x.expected_answer = result.expected_output;
x.stdout = result.std_output;
} else {
x.stdout = util.inspect((result.code_output || []).join('\n'));
let output = result.code_output || [];
if (Array.isArray(output)) {
output = output.join('\n');
}
x.stdout = util.inspect(output);
}

// make sure we pass eveything!
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vsc-leetcode-cli",
"version": "2.6.9",
"version": "2.6.10",
"description": "A cli tool to enjoy leetcode!",
"preferGlobal": "true",
"engines": {
Expand Down