mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
remove pending requests and send message from tern-worker on Tern errors
This commit is contained in:
1 parent
77a1b7f2a2
commit
e5e028e535
2 files changed
+35
-20
No files matched your search
@@ -308,8 +308,22 @@ define(function (require, exports, module) {
|
||||
function getPendingRequest(file, offset, type) {
|
||||
var key = file + "@" + offset;
|
||||
if (Object.prototype.hasOwnProperty.call(pendingTernRequests, key)) {
|
||||
var requests = pendingTernRequests[key];
|
||||
return requests[type];
|
||||
var requests = pendingTernRequests[key],
|
||||
requestType = requests[type],
|
||||
anyProperties = false;
|
||||
|
||||
delete pendingTernRequests[key][type];
|
||||
|
||||
for (var prop in pendingTernRequests[key]) {
|
||||
anyProperties = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!anyProperties) {
|
||||
delete pendingTernRequests[key];
|
||||
}
|
||||
|
||||
return requestType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user