Permalink
Browse files

- replaced some instances of $defined with a simpler check.

 - small fix for selectors documentation

git-svn-id: http://svn.mootools.net/trunk@1532 4db308c1-fb21-0410-9919-de62e267375e
  • Loading branch information...
1 parent 7a96c9c commit 75ebd2af1481c33068193ee227c04cc830f3368f kamicane committed Apr 10, 2008
Showing with 4 additions and 5 deletions.
  1. +1 −2 Docs/Utilities/Selectors.md
  2. +1 −1 Source/Core/Core.js
  3. +1 −1 Source/Native/Function.js
  4. +1 −1 Source/Native/Hash.js
View
3 Docs/Utilities/Selectors.md
@@ -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:
View
2 Source/Core/Core.js
@@ -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;
};
View
2 Source/Native/Function.js
@@ -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);
View
2 Source/Native/Hash.js
@@ -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;
},

0 comments on commit 75ebd2a

Please sign in to comment.