Răsfoiți Sursa

minor yak sahving

Evan You 12 ani în urmă
părinte
comite
dceaafb379
2 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 3 3
      src/api/lifecycle.js
  2. 1 1
      src/observe/array-augmentations.js

+ 3 - 3
src/api/lifecycle.js

@@ -1,5 +1,3 @@
-var _ = require('../util')
-
 /**
  * Set instance target element and kick off the compilation process.
  * The passed in `el` can be a selector string, an existing Element,
@@ -26,6 +24,8 @@ exports.$mount = function (el) {
 
 exports.$destroy = function (remove) {
   this._callHook('beforeDestroy')
-  // TODO
+  if (remove) {
+    // TODO
+  }
   this._callHook('afterDestroy')
 }

+ 1 - 1
src/observe/array-augmentations.js

@@ -51,7 +51,7 @@ var arrayAugmentations = Object.create(Array.prototype)
 
     // link/unlink added/removed elements
     if (inserted) ob.link(inserted, index)
-    if (removed) ob.unlink(removed, index)
+    if (removed) ob.unlink(removed)
 
     // update indices
     if (method !== 'push' && method !== 'pop') {