Skip to content
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion has.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,14 @@
// Expose has()
// some AMD build optimizers, like r.js, check for specific condition patterns like the following:
if(typeof define == "function" && typeof define.amd == "object" && define.amd){
define("has", function(){
define("has", ["module"], function(module){
var propKey, moduleConfig = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to init moduleConfig = {}; it can just be moduleConfig;.

if(typeof module.config == "function"){
moduleConfig = module.config();
}
for(propKey in moduleConfig){
has.add(propKey, moduleConfig[propKey]);
}
return has;
});
}
Expand Down