Skip to content

Fix for JS SDK needing a key #680

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 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ function ParseServer({
databaseURI,
cloud,
collectionPrefix = '',
clientKey = '',
javascriptKey = randomString(20),
dotNetKey = '',
restAPIKey = '',
clientKey,
javascriptKey,
dotNetKey,
restAPIKey,
fileKey = 'invalid-file-key',
facebookAppIds = [],
enableAnonymousUsers = true,
Expand All @@ -92,7 +92,7 @@ function ParseServer({
}) {

// Initialize the node client SDK automatically
Parse.initialize(appId, javascriptKey, masterKey);
Parse.initialize(appId, javascriptKey || 'unused', masterKey);
Copy link
Contributor

Choose a reason for hiding this comment

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

javascript key is never undefined here as it's defaulted to ''

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, how about now, with the defaults removed...

Copy link
Contributor

Choose a reason for hiding this comment

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

That should do, but not sure why @drew-gross added the default strings there?

Copy link
Contributor

Choose a reason for hiding this comment

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

That was just me mimicking the previous behaviour when updating this function to ES6 style

Parse.serverURL = serverURL;

if (databaseAdapter) {
Expand Down