Merge pull request #2601 from overleaf/jpa-hotfix-autocomplete-deleted-docs

[autocomplete] ignore deleted docs for completion

GitOrigin-RevId: 9f39bbb90d443e7a1691ff5558742e4d12f4eb4d
This commit is contained in:
nate stemen 2020-02-19 08:08:00 -05:00 committed by Copybot
parent cae6cf6efa
commit 3b70e080b1

View file

@ -105,7 +105,11 @@ define([
const commandName = match[1] const commandName = match[1]
const result = [] const result = []
for (let file of Files.getTeXFiles()) { for (let file of Files.getTeXFiles()) {
if (file.id !== this.$scope.docId) { if (
file.id !== this.$scope.docId &&
!file.deleted &&
file.path
) {
const { path } = file const { path } = file
let cleanPath = path.replace(/(.+)\.tex$/i, '$1') let cleanPath = path.replace(/(.+)\.tex$/i, '$1')
result.push({ result.push({