Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin should return the NestedModel object instead of Backbone. (CommonJS, AMD) #150

Open
achinaou opened this issue Nov 17, 2015 · 2 comments

Comments

@achinaou
Copy link

When I require("backbone-nested-model") it returns the Backbone object but it should
return the NestedModel object so you can instantiate or extend from it a new NestedModel object.

This is how it works now:

var Backbone = require("backbone-nested-model");

var User = Backbone.NestedModel.extend({
});

var user = new User();

This is how it should be:

var NestedModel = require("backbone-nested-model");

var User = NestedModel.extend({
});

var user = new User();
@achinaou
Copy link
Author

I can create a PR but it can be dangerous because it's a breaking change.

@achinaou achinaou changed the title Can't use the CommonJS version properly The plugin should return the NestedModel object instead of Backbone Nov 18, 2015
@achinaou achinaou changed the title The plugin should return the NestedModel object instead of Backbone The plugin should return the NestedModel object instead of Backbone. (CommonJS, AMD) Nov 24, 2015
@just-boris
Copy link

That's true. Ask @afeld pay attention for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants