Skip to content

Commit a55087f

Browse files
committed
48 - Prevent premature returns from the is_javascript_project method
1 parent dc5cb18 commit a55087f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libs/util.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,14 +638,16 @@ def is_javascript_project():
638638
if project_file_name:
639639
project_dir_name = os.path.dirname(project_file_name)
640640
settings_dir_name = os.path.join(project_dir_name, PROJECT_SETTINGS_FOLDER_NAME)
641-
return os.path.isdir(settings_dir_name)
641+
if os.path.isdir(settings_dir_name):
642+
return True
642643

643644
# If not found at the location of the .sublime-project file, try to look in the open folders.
644645
folders = sublime.active_window().folders()
645646
if len(folders) > 0:
646647
folders = folders[0]
647648
settings_dir_name = os.path.join(folders, PROJECT_SETTINGS_FOLDER_NAME)
648-
return os.path.isdir(settings_dir_name)
649+
if os.path.isdir(settings_dir_name):
650+
return True
649651

650652
return False
651653

0 commit comments

Comments
 (0)