You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base is taken as an optional 4th parameter. It's then passed as the 'base' field of the optional arguments dict. The weird error checking here comes from the fact that it's using aropt to check the number of fields. The simple heuristic "is the 4th value an object?" is used to decided if this is an options dict or not which is why we get different results when it's a number. The distinction between 0 and 1 exists because 0 is falsy (and apparently the ? operator is CoffeeScript doesn't work as advertised, -1 one more for coffeescript).
The type error though is coming from the server. Why doesn't the server accept an object value as a base argument?
Fortunately, we don't have to worry about any of this because we're getting rid of the optional base argument. Michel was testing this for the docs and I think the most reasonable way forwards is to just remove all reference to the base argument from the docs now even if it's still technically in there.
Activity
mlucy commentedon Jun 5, 2013
@wmrowan -- how do you specify the optional base in the JS client?
I think we should let this lie since we're going to remove the optional base soon.
wmrowan commentedon Jun 5, 2013
The base is taken as an optional 4th parameter. It's then passed as the 'base' field of the optional arguments dict. The weird error checking here comes from the fact that it's using
aroptto check the number of fields. The simple heuristic "is the 4th value an object?" is used to decided if this is an options dict or not which is why we get different results when it's a number. The distinction between 0 and 1 exists because 0 is falsy (and apparently the ? operator is CoffeeScript doesn't work as advertised, -1 one more for coffeescript).The type error though is coming from the server. Why doesn't the server accept an object value as a base argument?
Fortunately, we don't have to worry about any of this because we're getting rid of the optional base argument. Michel was testing this for the docs and I think the most reasonable way forwards is to just remove all reference to the base argument from the docs now even if it's still technically in there.
mlucy commentedon Jun 5, 2013
I concur; in GMR it was superfluous even before we had
default.coffeemug commentedon Feb 17, 2014
@mlucy -- should we close this now that #888 is closed? I don't see anything else we can realistically do here.