Просмотр исходного кода

return removed element in $remove (fix #990)

Evan You 11 лет назад
Родитель
Сommit
a0b1a38dfd
1 измененных файлов с 2 добавлено и 2 удалено
  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