Closed yongshun950824 closed 2 years ago
It's funny because I fixed this on the same day without reading your issue.
It was fixed the evening of the same day: https://github.com/Drarig29/brackets-storage/commit/d8631f3cb11841eab2ff965cfd6b07e107af3019
Thanks for the issue though 😉
The opt-in normalized Ids feature is introduced in 1.4.1.
Issue:
However, when I go through the code example:
https://github.com/Drarig29/brackets-manager.js/blob/18900570b0d60a9c2bb9cdf1233672e25ddfe859/src/reset.ts#L14-L15
I think the below part will lead to the error:
when the id not supposed to be index.
https://github.com/Drarig29/brackets-storage/blob/30f45dc8eb4fa5b0df411d517aa78ab473560d75/brackets-memory-db/index.ts#L136-L141
Step to trigger:
normalizeIds = true
.Affected code:
Within 380 references
Propose idea / solution:
Either in brackets-manager.js for the related code (mentioned in Screenshot) have to modify as:
Or search by id instead of by index.
P.S.: The below code is just a concept
Note:
This issue is not urgent as currently, I force the ids must be normalized.
Hope you take time to fix it. Thanks in advance. =)