summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthewsot <matthewsot@outlook.com>2017-06-17 00:19:01 -0700
committermatthewsot <matthewsot@outlook.com>2017-06-17 00:19:01 -0700
commitf6e7cf6d0c0a96cf984075a09298cbdeab4cfd41 (patch)
tree3c52b921890e9a825c25d5dc78f85626d20e9306
parent98b7bc251da98fee5dc2d47262351cbd8befd11d (diff)
fixed small bug
It should break out of the search loop, not end the entire function, when it finds & removes a duplicate
-rw-r--r--jfn.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jfn.js b/jfn.js
index d08afee..9790a26 100644
--- a/jfn.js
+++ b/jfn.js
@@ -69,7 +69,7 @@ jfn.defineFunction = function (object, name, args, defaults, fn) {
var f = object[name]["__jfn"]["fns"][i];
if (JSON.stringify(f.args) === JSON.stringify(args)) {
object[name]["__jfn"]["fns"].splice(i, 1);
- return;
+ break;
}
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback