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

Refactor synced GET function #1135

Merged
merged 1 commit into from
Nov 1, 2018
Merged

Conversation

raucao
Copy link
Member

@raucao raucao commented Oct 31, 2018

Simplify the code. Aside from being more readable, this fixes a problem with the UglifyJS compressor destroying the code by restructuring it wrong.

closes #1133

Simplify the code. Aside from being more readable, this fixes a problem
with the UglifyJS compressor destroying the code by restructuring it
wrong.

closes #1133
@ghost ghost assigned raucao Oct 31, 2018
@ghost ghost added the in progress label Oct 31, 2018
context.remote.connected && context.remote.online) {
return 2 * context.getSyncInterval();
} else {
log('Not setting default maxAge, because remote is offline or not connected');
Copy link
Member

Choose a reason for hiding this comment

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

The log in this function is kind of misleading, as the function itself is not setting anything but just returning a value.

Copy link
Member Author

Choose a reason for hiding this comment

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

The function is only used one time in the code below. It's never used for not setting the default max age. So I think it's OK in this case.

@galfert
Copy link
Member

galfert commented Oct 31, 2018

LGTM 👍

@silverbucket
Copy link
Member

👍

@raucao raucao merged commit d4c0dbf into master Nov 1, 2018
@ghost ghost removed the in progress label Nov 1, 2018
@raucao raucao deleted the bugfix/1133-max_age_handling_2 branch November 1, 2018 10:48
@oskarrough
Copy link

Thanks again for this. Any chance of a new release with it?

@raucao
Copy link
Member Author

raucao commented Nov 5, 2018

Yup, sometime this week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Argument 'maxAge' must be false or a number
4 participants