JS resources now use functions for defaults
Review Request #7381 — Created June 4, 2015 and submitted — Latest diff uploaded
Previously, the
RB.BaseResource
model was using an object literal for
its defaults, but its default value for extra data was an empty object.
This could possibly result in shared state if a resource did not return
anextra_data
JSON field, so thedefaults
property has been changed
into a function to avoid this.All child resources of
RB.BaseResource
have been modified to use a
function instead of an attribute fordefaults
and to correctly invoke
the parent class's definition ofdefaults
.
Ran JS tests.