Fixes #19. Can now beautify new files that have not been created/saved.

This commit is contained in:
Glavin Wiechert 2014-06-13 00:40:29 -03:00
parent b530eda6e3
commit c34f6f9419
1 changed files with 2 additions and 0 deletions

View File

@ -165,6 +165,8 @@ function beautify() {
var editedFilePath = editor.getPath();
function getConfig(startPath) {
// Verify that startPath is a string
startPath = (typeof startPath === 'string') ? startPath : __dirname || '';
// Get the path to the config file
var configPath = findConfig('.jsbeautifyrc', startPath);