aboutsummaryrefslogtreecommitdiffstats
path: root/_libly.js
diff options
context:
space:
mode:
Diffstat (limited to '_libly.js')
-rw-r--r--_libly.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/_libly.js b/_libly.js
index 301a552..b6a6da6 100644
--- a/_libly.js
+++ b/_libly.js
@@ -102,6 +102,9 @@ libly.$U = {//{{{
},
A: function(hash, iter) {
var ret = [];
+ if (typeof hash == 'undefined') return ret;
+ if (typeof hash == 'string') return [hash];
+ if (hash.toArray) return hash.toArray();
for each (let item in hash) ret.push(item);
return ret;
},