Просмотр исходного кода

Merge pull request #1505 from sharelatex/ns-fix-regex

remove unecessary $ from regex

GitOrigin-RevId: 5998536f71298daeab2845d070150451bbb4a858
Timothée Alby 7 лет назад
Родитель
Сommit
f01f80c2bb
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/web/public/src/ide/file-tree/controllers/FileTreeController.js

+ 1 - 1
services/web/public/src/ide/file-tree/controllers/FileTreeController.js

@@ -130,7 +130,7 @@ define(['base'], function(App) {
       $scope.cancel = () => $modalInstance.dismiss('cancel')
       $scope.cancel = () => $modalInstance.dismiss('cancel')
       $scope.create = () => $scope.$broadcast('create')
       $scope.create = () => $scope.$broadcast('create')
       return $scope.$on('done', (e, opts = {}) => {
       return $scope.$on('done', (e, opts = {}) => {
-        isBibFile = opts.name && opts.name.match(/^.*\.bib$$/)
+        isBibFile = opts.name && /^.*\.bib$/.test(opts.name)
         if (opts.shouldReindexReferences || isBibFile) {
         if (opts.shouldReindexReferences || isBibFile) {
           ide.$scope.$emit('references:should-reindex', {})
           ide.$scope.$emit('references:should-reindex', {})
         }
         }