Parcourir la source

return removed element in $remove (fix #990)

Evan You il y a 11 ans
Parent
commit
a0b1a38dfd
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/observer/array.js

+ 2 - 2
src/observer/array.js

@@ -84,9 +84,9 @@ _.define(
       index = _.indexOf(this, index)
     }
     if (index > -1) {
-      this.splice(index, 1)
+      return this.splice(index, 1)
     }
   }
 )
 
-module.exports = arrayMethods
+module.exports = arrayMethods