Skip to content

Commit

Permalink
Silently fail if bad args passed to glow.anim.css()
Browse files Browse the repository at this point in the history
This reverts a backwardly incompatible change where an error was thrown if the element ref supplied was useless.
  • Loading branch information
elson committed Jul 8, 2009
1 parent 2509852 commit eea91b9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGES
@@ -1,5 +1,9 @@
Glow Changelog

1.5.1

* glow.anim.css - now silently fails if an empty nodelist is passed in, rather than throwing an error

1.5.0

* glow.forms - Added "is" test, to ensure one field equals a particular value
Expand Down
6 changes: 3 additions & 3 deletions build.properties
@@ -1,4 +1,4 @@
LINE=1.5
VERSION=1.5.0
CSSVERSION=150
YUI_JAR=../../yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar
VERSION=1.5.1
CSSVERSION=151
YUI_JAR=../../../yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar
15 changes: 6 additions & 9 deletions src/anim/anim.js
Expand Up @@ -320,16 +320,13 @@
r.css = function(element, duration, spec, opts) {

element = get(element);

// Fix for trac 156 - glow.anim.css should fail better if the element doesn't exist
if (!element[0]) {
throw new Error("Invalid element passed into glow.anim.css");
}

var anim = new r.Animation(duration, opts),
cssProp;

events.addListener(anim, "frame", buildAnimFunction(element, spec));
var anim = new r.Animation(duration, opts);

// Fix for trac 156 - glow.anim.css should fail better if the element doesn't exist
if (element[0]) {
events.addListener(anim, "frame", buildAnimFunction(element, spec));
}
return anim;
};

Expand Down
3 changes: 3 additions & 0 deletions src/map.js
Expand Up @@ -139,6 +139,9 @@ gloader.map.add(
},
{
$version: "1.5.0"
},
{
$version: "1.5.1"
}
);

Expand Down

0 comments on commit eea91b9

Please sign in to comment.