Ver código fonte

return removed element in $remove (fix #990)

Evan You 11 anos atrás
pai
commit
a0b1a38dfd
1 arquivos alterados com 2 adições e 2 exclusões
  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