Skip to content

Commit

Permalink
- replaced some instances of $defined with a simpler check.
Browse files Browse the repository at this point in the history
 - small fix for selectors documentation

git-svn-id: http://svn.mootools.net/trunk@1532 4db308c1-fb21-0410-9919-de62e267375e
  • Loading branch information
kamicane committed Apr 10, 2008
1 parent 7a96c9c commit 75ebd2a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Docs/Utilities/Selectors.md
Expand Up @@ -10,12 +10,11 @@ Gets all the elements within an element that match the given selector.

### Syntax:

var myElements = myElement.getElements(selector[, nocash]);
var myElements = myElement.getElements(selector);

### Arguments:

1. selector - (*string*) The CSS Selector to match.
2. nocash - (*boolean*, optional: defaults to false) If true, the found Elements are not extended.

### Returns:

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core.js
Expand Up @@ -176,7 +176,7 @@ function $merge(){

function $pick(){
for (var i = 0, l = arguments.length; i < l; i++){
if ($defined(arguments[i])) return arguments[i];
if (arguments[i] != undefined) return arguments[i];
}
return null;
};
Expand Down
2 changes: 1 addition & 1 deletion Source/Native/Function.js
Expand Up @@ -18,7 +18,7 @@ Function.implement({
options = options || {};
return function(event){
var args = options.arguments;
args = $defined(args) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0);
args = (args != undefined) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0);
if (options.event) args = [event || window.event].extend(args);
var returns = function(){
return self.apply(options.bind || null, args);
Expand Down
2 changes: 1 addition & 1 deletion Source/Native/Hash.js
Expand Up @@ -58,7 +58,7 @@ Hash.implement({

include: function(key, value){
var k = this[key];
if (!$defined(k)) this[key] = value;
if (k == undefined) this[key] = value;
return this;
},

Expand Down

0 comments on commit 75ebd2a

Please sign in to comment.