Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Allow client to control pay window (bug 1122655) #62

Merged
merged 1 commit into from
Jan 20, 2015

Conversation

kumar303
Copy link
Contributor

opt = opt || {};
opt.maxTries = opt.maxTries || undefined;
opt.pollIntervalMs = opt.pollIntervalMs || undefined;
opt = utils.defaults(opt, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure of this - utils.defaults() only replaces items when they're undefined. So this wouldn't really do anything. If the props of opts are undefined already these defaults won't do anything. The previous code would make things undefined if falsey which is a subtle difference (not sure if that was useful in any case).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's fine. I was listing these properties as undefined merely to document them because it seemed helpful to know what properties are valid on an options argument when looking at the top of a function definition. In other words: sigh, javascript.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok, fair enough then. Maybe a comment with the reasoning - just for our future selves?

@muffinresearch
Copy link
Contributor

r+wc

kumar303 added a commit that referenced this pull request Jan 20, 2015
Allow client to control pay window (bug 1122655)
@kumar303 kumar303 merged commit 6f90f3e into mozilla:master Jan 20, 2015
@kumar303 kumar303 deleted the pay-win branch January 20, 2015 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants