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

Reliably check file.js options #270

Merged
merged 2 commits into from
Nov 16, 2016
Merged

Reliably check file.js options #270

merged 2 commits into from
Nov 16, 2016

Conversation

PsychoLlama
Copy link
Contributor

@PsychoLlama PsychoLlama commented Nov 15, 2016

The FileJS module can be passed options in two ways, and this commit
ensures they're treated in the right way.
Previously, options passed as .put or .get parameters would be favored
over those used on the chain, even if file wasn't specified. Now, the
module will only use the method options if file is mentioned, falling
back to the chain options.
This was a mistake on my part with the first PR (#268), I failed to notice that edge case.

The FileJS module can be passed options in two ways, and this commit
ensures they're treated in the right way.
Previously, options passed as .put or .get parameters would be favored
over those used on the chain, even if `file` wasn't specified. Now, the
module will only use the method options if `file` is mentioned, falling
back to the chain options.
This was a mistake on my part with the first PR (#268), I failed to notice notice that edge case.
If you're reading this commit history, please avert your eyes. 3
commits to fix this admittedly simple problem is more than my pride can handle.
The `gun.Back()` function was only searching for `opt`, not
`opt.file`. It would stop at the first mention of `opt` even if it
didn't have settings for `file`. Now it won't.
@amark
Copy link
Owner

amark commented Nov 16, 2016

I'm sure this is good... go ahead and merge yourself, please. :)

@PsychoLlama
Copy link
Contributor Author

You got it, Mark.

@PsychoLlama PsychoLlama merged commit 2317a54 into amark:0.5 Nov 16, 2016
@PsychoLlama PsychoLlama deleted the allow-file-json-opt-out branch November 16, 2016 00:24
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