Skip to content

Require a server URL #608

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

Merged
merged 1 commit into from
Feb 24, 2016

Conversation

drew-gross
Copy link
Contributor

Throw at launch if no server url is provided. Hopefully this will reduce the number of issues that are opened.

@@ -82,7 +82,7 @@ function ParseServer({
facebookAppIds = [],
enableAnonymousUsers = true,
oauth = {},
serverURL = '',
serverURL = (()=>{throw 'You must provide a serverURL!'})(),
Copy link
Contributor

Choose a reason for hiding this comment

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

let's use the same pattern on appId and masterKey then no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I don't see why not. I might actually give this pattern a name to make it more clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

Too bad we can't use '!!' as a function name. notOptional("serverURL"), required is confusing, compulsory too long, provided sounds weird,

@facebook-github-bot
Copy link

@drew-gross updated the pull request.

@facebook-github-bot
Copy link

@drew-gross updated the pull request.

@nlutsenko
Copy link
Contributor

Squash and merge? Love the 2 liners :)

drew-gross added a commit that referenced this pull request Feb 24, 2016
@drew-gross drew-gross merged commit 63a7e85 into parse-community:master Feb 24, 2016
@drew-gross drew-gross deleted the throw-no-server-url branch April 5, 2016 21:52
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.

4 participants