Fix "Cannot read property 'split' of undefined"
Fix "Cannot read property 'split' of undefined" when using php-cs-fixer. This bug has also been mentioned here: https://github.com/Glavin001/atom-beautify/issues/2044
This commit is contained in:
parent
41d5051b39
commit
b9e30d8100
|
@ -61,7 +61,7 @@ module.exports = class PHPCSFixer extends Beautifier
|
|||
options.cs_fixer_config_file = if context? and context.filePath? then @findFile(path.dirname(context.filePath), configFiles)
|
||||
|
||||
# Try again to find a config file in the project root
|
||||
if not options.cs_fixer_config_file
|
||||
if not options.cs_fixer_config_file and atom.project.getPaths()[0]
|
||||
options.cs_fixer_config_file = @findFile(atom.project.getPaths()[0], configFiles)
|
||||
|
||||
phpCsFixerOptions = [
|
||||
|
|
Loading…
Reference in New Issue