Skip to content

Commit

Permalink
fix the priority order test by allowing defined[fullName] = undefined…
Browse files Browse the repository at this point in the history
…. An undefined property is not the same as property which is undefined.
  • Loading branch information
johnjbarton committed Jun 2, 2011
1 parent f36801b commit 52b7e3d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions require.js
Expand Up @@ -555,10 +555,9 @@ var require, define;
//will be used for integrity.
ret = defined[fullName];
} else {
if (ret) { // This change breaks the priority order test
//Use the return value from the function.
defined[fullName] = ret;
} else {
//Use the return value from the function.
defined[fullName] = ret;
if (!ret) {
if (req.onDebug && typeof(jQuery) === "undefined") {
var noReturn = makeError("noreturn", "The module \'"+fullName+"\' has false return value");
req.onDebug(noReturn);
Expand Down

0 comments on commit 52b7e3d

Please sign in to comment.