Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10647 from MarcelGerber/tern-protocol-relative-urls
Browse files Browse the repository at this point in the history
Don't try to handle protocol-relative URLs from Tern
  • Loading branch information
nethip committed Jun 22, 2015
2 parents 53165a1 + ac59d3d commit fb049f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/extensions/default/JavaScriptCodeHints/ScopeManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,8 @@ define(function (require, exports, module) {
* @return {jQuery.Promise} - the Promise returned from DocumentMangaer.getDocumentText()
*/
function getDocText(filePath) {
if (!FileSystem.isAbsolutePath(filePath)) {
if (!FileSystem.isAbsolutePath(filePath) || // don't handle URLs
filePath.slice(0, 2) === "//") { // don't handle protocol-relative URLs like //example.com/main.js (see #10566)
return (new $.Deferred()).reject().promise();
}

Expand Down Expand Up @@ -1534,4 +1535,4 @@ define(function (require, exports, module) {
exports.handleProjectOpen = handleProjectOpen;
exports._readyPromise = _readyPromise;

});
});

0 comments on commit fb049f2

Please sign in to comment.