Closed ceribe closed 1 year ago
Thanks for the PR! Never thought about this... I'll check this and merge it today or tomorrow.
@ceribe can you change it to .toString()
? I think this is better, as the vs code team also uses toString.
https://github.com/microsoft/vscode/blob/93cbbc5cae50e9f5f5046343c751b6d010468200/src/vs/base/common/map.ts#L434
Probably it has something to do with remote development, browser version or whatever.
Sure thing, changed it.
How to replicate the bug:
This is caused by comparison function used when finding instances. Comparing objects with === only checks for reference equality. If we open the same file twice then both uri objects will have the same content, but their references will be different. The fix in this PR makes it work by changing how uri objects are compared. Comparing path should do the job well enough, but if there is something I'm missing then using .toString() should fix the problem too.