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

Commit 453e927

Browse files
navchboopeshmahendran
authored andcommitted
In case unsaved file, Tern is returning filename without forward slash (#14055)
* In case unsaved file, Tern is returning filename without forward slash * Addressing review comments
1 parent a3b6d6c commit 453e927

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/extensions/default/JavaScriptRefactoring/RenameIdentifier.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ define(function (require, exports, module) {
9797
var result = new $.Deferred();
9898

9999
function isInSameFile(obj, refsResp) {
100-
return (obj && obj.file === refsResp.file);
100+
// In case of unsaved files, After renameing once Tern is returning filename without forward slash
101+
return (obj && (obj.file === refsResp.file || obj.file === refsResp.file.slice(1, refsResp.file.length)));
101102
}
102103

103104
/**

0 commit comments

Comments
 (0)