WP-API / client-js

Backbone-based JavaScript client for WP API
267 stars 58 forks source link

WP-API JS client can't use getCategories for models returned by collections #147

Closed adamsilverstein closed 7 years ago

adamsilverstein commented 7 years ago

Fix an issue where models automatically created for fetched collections didn't have appropriate mixin methods, like .getCategories, applied. Resolved by defining the model property of collections as a function returning an new instantiated model, instead of a static model prototype.

Props jesseenterprises.

See https://core.trac.wordpress.org/ticket/39070