Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: check the nullness of project_savvy_settings #1013

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

randy3k
Copy link
Collaborator

@randy3k randy3k commented Sep 20, 2018

close #1007

core/settings.py Outdated
@@ -11,7 +11,7 @@ def get(self, key, default=None):
view = window.active_view()
project_savvy_settings = view.settings().get("GitSavvy", {})

if key in project_savvy_settings:
if project_savvy_settings and key in project_savvy_settings:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also be fixed by doing this on line 12:

        project_savvy_settings = view.settings().get("GitSavvy") or {}

Not sure which style we prefer

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your suggustion asfaltboy

Copy link
Member

@asfaltboy asfaltboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @randy3k

@randy3k randy3k merged commit 311593c into dev Sep 21, 2018
@randy3k randy3k deleted the project_savvy_settings branch September 21, 2018 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants