Skip to content

Commit

Permalink
define call should include empty dependencies
Browse files Browse the repository at this point in the history
Without this, the factory may be scanned for additional dependencies matching the literal string `require("module-id")`, which is not correct. See https://github.com/amdjs/amdjs-api/wiki/AMD#simplified-commonjs-wrapping-.
  • Loading branch information
csnover committed Jan 14, 2014
1 parent c505e9d commit 4ba264e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion returnExports.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory);
define([], factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
Expand Down

0 comments on commit 4ba264e

Please sign in to comment.