Skip to content

Commit

Permalink
fix: add check for nil test case file (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
pansophism authored Nov 11, 2023
1 parent e655c23 commit c5a5811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func appendToTestCases(q *leetcode.QuestionData, result *leetcode.SubmitCheckRes
return false, err
}
testCasesFile := genResult.GetFile(lang.TestCasesFile)
if !utils.IsExist(testCasesFile.GetPath()) {
if testCasesFile == nil || !utils.IsExist(testCasesFile.GetPath()) {
return false, nil
}

Expand Down

0 comments on commit c5a5811

Please sign in to comment.