jashkenas / backbone

Give your JS App some Backbone with Models, Views, Collections, and Events
http://backbonejs.org
MIT License
28.09k stars 5.39k forks source link

Function extend does not properly expose static properties from base classes #4217

Open SylvainCorlay opened 5 years ago

SylvainCorlay commented 5 years ago

If a backbone model is an ES6 class with a statc property, and one use Model.extend to make a subclass (instead of the ES6 extends), the static properties of the base model are not added to the subclass.

blikblum commented 5 years ago

This is one of the issues with ES6 classes. See https://github.com/jashkenas/backbone/issues/3560 for discussion.

SylvainCorlay commented 5 years ago

@blikblum I have gone through this discussion earlier. I am not sure the specific issue that I am describing is covered in the discussion..

oliverfoster commented 4 years ago

@SylvainCorlay does my PR fix your issue? Static propery inheritance on the constructors?