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

Add types and reduce function context #1889

Merged
merged 1 commit into from
Feb 11, 2020
Merged

Conversation

belcherj
Copy link
Contributor

@belcherj belcherj commented Feb 7, 2020

Fix

We pass an object to a isDevConfig but it only uses the one property. This changes the function to only accept that property and types it as a boolean. I updated the one place where the function is called. I also updated the tests.

Test

  1. Run Simplenote with console open.
  2. In dev you should see: Simperium config: Development
  3. In prod you should see: Simperium config: Production

@belcherj belcherj requested a review from a team February 7, 2020 18:46
@belcherj belcherj self-assigned this Feb 7, 2020
@belcherj
Copy link
Contributor Author

belcherj commented Feb 7, 2020

Do we need this code? Is this helpful information? Could we combine it with the dev badge that gets added to the bottom of the note editor?

@belcherj belcherj force-pushed the update/clean-up-is-dev branch from 28ae726 to 3e352bf Compare February 10, 2020 19:22
Copy link
Member

@dmsnell dmsnell left a comment

Choose a reason for hiding this comment

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

Do we need this code?

For this PR I think your refactoring and reduction in scope is a positive step. Maybe we can come back later if this is problematic and assess if it's needed somewhere we're not immediately aware of?

@belcherj
Copy link
Contributor Author

Agreed, I want to come back and delete the function all together.

@belcherj belcherj merged commit 3e45fc3 into develop Feb 11, 2020
@belcherj belcherj deleted the update/clean-up-is-dev branch February 11, 2020 16:18
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.

2 participants