Skip to content

Commit 483aa9c

Browse files
committed
Fix document handle invalidation in cases where a document cannot be loaded
1 parent 1413aca commit 483aa9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/resource/coordinator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,16 +222,17 @@ function invalidateHandles(uri) {
222222
* @param {URI} uri The URI of the document
223223
*/
224224
function invalidateDocumentHandles(uri) {
225+
invalidateHandles(uri);
225226
var url = uri.toStringWithoutFragment();
226227
var docCache = getDocumentCache(url);
227228
if (!docCache) {
228229
// The document was never loaded
229-
invalidateHandles(uri);
230230
return;
231231
}
232232
var fragments = docCache.fragments;
233233
docCache.fragments = [];
234234
for (var i = 0; i < fragments.length; ++i) {
235+
uri.fragment = fragments[i];
235236
invalidateHandles(uri);
236237
}
237238
}

0 commit comments

Comments
 (0)