diff options
| author | Igor Minar | 2011-08-24 18:36:35 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-08-24 18:36:38 -0700 | 
| commit | 452607fc64b2b0ba5ee9a8745746e652ae21b6db (patch) | |
| tree | 8615c861cd58d54ca8bb2d03d8994a46870f10bd /src/Scope.js | |
| parent | 19401280aed9d4767faddcf58fab91ec13c556a9 (diff) | |
| download | angular.js-452607fc64b2b0ba5ee9a8745746e652ae21b6db.tar.bz2 | |
fix(events): fixing IE specific issues
IE doesn't have Array#indexOf and [].splice.call doesn't work there
either.
Diffstat (limited to 'src/Scope.js')
| -rw-r--r-- | src/Scope.js | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/src/Scope.js b/src/Scope.js index 12ac2833..badfc3f5 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -569,10 +569,11 @@ Scope.prototype = {     * @param {function} listener Function to remove.     */    $removeListener: function(name, listener) { -    var namedListeners = this.$$listeners[name]; -    var i; +    var namedListeners = this.$$listeners[name], +        i; +      if (namedListeners) { -      i = namedListeners.indexOf(listener); +      i = indexOf(namedListeners, listener);        namedListeners.splice(i, 1);      }    }, | 
