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

AMD callback name selection prevents usage of local variables with same name. #74

Closed
rwjblue opened this issue Jan 25, 2015 · 3 comments · Fixed by #76
Closed

AMD callback name selection prevents usage of local variables with same name. #74

rwjblue opened this issue Jan 25, 2015 · 3 comments · Fixed by #76
Assignees

Comments

@rwjblue
Copy link
Contributor

rwjblue commented Jan 25, 2015

Input:

var exports = {};

export default exports;

Output:

define(['exports'], function (exports) {

    'use strict';

    var exports = {};

    exports['default'] = exports;

});

The callback arguments should not use a name that conflicts with variables in the local scope.

@eventualbuddha eventualbuddha self-assigned this Jan 25, 2015
@Rich-Harris
Copy link
Contributor

Have a fix, will push when I have good wifi

On Sun, 25 Jan 2015 08:50 Robert Jackson notifications@github.com wrote:

Input:

var exports = {};
export default exports;

Output:

define(['exports'], function (exports) {

'use strict';

var exports = {};

exports['default'] = exports;

});


The callback arguments should not use a name that conflicts with variables
in the local scope.


Reply to this email directly or view it on GitHub
#74.

@eventualbuddha
Copy link
Contributor

Oh no! I also have a fix. That's why I assigned to myself. I'll push mine anyway so we can compare approaches.

@Rich-Harris
Copy link
Contributor

Ah, didn't know - got the issue email just before take off! Am sure our
fixes are very similar, so by all means merge yours - I'll be AFK for a
while

On Sun, 25 Jan 2015 12:07 Brian Donovan notifications@github.com wrote:

Oh no! I also have a fix. That's why I assigned to myself. I'll push mine
anyway so we can compare approaches.


Reply to this email directly or view it on GitHub
#74 (comment)
.

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

Successfully merging a pull request may close this issue.

3 participants