diff options
| author | Igor Minar | 2012-03-13 10:02:56 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-03-13 14:13:53 -0700 |
| commit | b6ae6e52f99c0c3c45ad787328a2e800ff07ca2c (patch) | |
| tree | 61cdc3f9d1739f21c08646807f6785ee2144bd30 /src/directive/form.js | |
| parent | 9277d12fc0052efacbeed7cf9aaeea608e5f6108 (diff) | |
| download | angular.js-b6ae6e52f99c0c3c45ad787328a2e800ff07ca2c.tar.bz2 | |
fix(indexOf): use native impl if available
Diffstat (limited to 'src/directive/form.js')
| -rw-r--r-- | src/directive/form.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/directive/form.js b/src/directive/form.js index db645188..8c172889 100644 --- a/src/directive/form.js +++ b/src/directive/form.js @@ -98,11 +98,7 @@ function FormController(name, element) { function addControlError(validationToken, control) { var queue = errors[validationToken]; if (queue) { - for (var i = 0, length = queue.length; i < length; i++) { - if (queue[i] === control) { - return; - } - } + if (indexOf(queue, control)) return; } else { errors[validationToken] = queue = []; |
