Răsfoiți Sursa

return removed element in $remove (fix #990)

Evan You 11 ani în urmă
părinte
comite
a0b1a38dfd
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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