Fix error while committing a locked problem with an accepted solution. #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Came across the below error on a recent run:
Turns out the problem counting-elements is a locked/premium problem. As a consequence, fetching the
questionData
yieldsnull
, which then leads to an emptytree.content
in the commit, causing the above error.Interestingly, I do seem to have an accepted solution for the problem in my submission history.
And, No, I wasn't on leetcode premium in the past.
I'm guessing,
counting-elements
started off as an open problem, but was locked sometime after I'd solved it.As a hotfix for my personal use, I've wrapped
questionData
in a template literal. Please feel free to add appropriate fallback text and logs as you deem fit.Also, shot myself in the foot with the
git add .
in the pre-commit. Hence a tiny tweak.PS. Thanks for the good work, Josh. Very nifty tool!