diff options
| author | Misko Hevery | 2010-07-15 14:16:04 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-07-15 14:16:04 -0700 |
| commit | 7cef4358aea6f3cfa18dcfb8145d7bc0560bf157 (patch) | |
| tree | a207997545bedbd86af6d1b68f573da7398f30aa /src | |
| parent | 1de82283dbf1bed2fc04700584dc1123b1e159fe (diff) | |
| download | angular.js-7cef4358aea6f3cfa18dcfb8145d7bc0560bf157.tar.bz2 | |
fixed build
Diffstat (limited to 'src')
| -rw-r--r-- | src/filters.js | 2 | ||||
| -rw-r--r-- | src/jqLite.js | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/filters.js b/src/filters.js index 24464477..c8473af5 100644 --- a/src/filters.js +++ b/src/filters.js @@ -34,7 +34,7 @@ foreach({ return text; }, - 'date': function(amount) { + 'date': function(date) { }, 'json': function(object) { diff --git a/src/jqLite.js b/src/jqLite.js index de1884a3..cff9ae00 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -37,11 +37,18 @@ function jqClearData(element) { } function getStyle(element) { - var current = {}, style = element[0].style, value; - for (var name in style) { - value = style[name]; - if (1*name != name && name != 'cssText' && value && typeof value == 'string' && value !='false') - current[name] = value; + var current = {}, style = element[0].style, value, name, i; + if (typeof style.length == 'number') { + for(i = 0; i < style.length; i++) { + name = style[i]; + current[name] = style[name]; + } + } else { + for (name in style) { + value = style[name]; + if (1*name != name && name != 'cssText' && value && typeof value == 'string' && value !='false') + current[name] = value; + } } return current; } |
