aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utility.js b/src/utility.js
index 626f9978..fc5f7f88 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -216,10 +216,10 @@ function flatten(x) {
// Sets
function set() {
- if (typeof arguments[0] === 'object') arguments = arguments[0];
+ var args = typeof arguments[0] === 'object' ? arguments[0] : arguments;
var ret = {};
- for (var i = 0; i < arguments.length; i++) {
- ret[arguments[i]] = 0;
+ for (var i = 0; i < args.length; i++) {
+ ret[args[i]] = 0;
}
return ret;
}