JS resources now use functions for defaults

Review Request #7381 — Created June 4, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
11da7d2...

Reviewers

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
an extra_data JSON field, so the defaults 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 for defaults and to correctly invoke
the parent class's definition of defaults.

Ran JS tests.

    Loading...