mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
use regex test instead of match when only bool needed
This commit is contained in:
@@ -462,6 +462,6 @@ THEME_LIST = []
|
||||
do generateThemeList = () ->
|
||||
files = fs.readdirSync __dirname + '/../../../../public/js/' + PackageVersions.lib('ace')
|
||||
for file in files
|
||||
if file.slice(-2) == "js" and file.match(/^theme-/)
|
||||
if file.slice(-2) == "js" and /^theme-/.test(file)
|
||||
cleanName = file.slice(0,-3).slice(6)
|
||||
THEME_LIST.push cleanName
|
||||
|
||||
Reference in New Issue
Block a user