修复:not_found第一个参数不是闭包逻辑的时候,预设的逻辑闭包被调用时收到的第一个参数不是实际传给not_found的第一个参数 #9
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.
在 官方文档 中表示以下使用方式可以令预设的闭包逻辑可以收到传入not_found的参数(也就是1,2,3可以传给if_not_found设置的闭包逻辑):
但是实际上不是这样的。例如以下的测试场景:
理论上访问应该是得到:
[1,2,3]
,但实际得到的是:[{},2,3]
。