diff --git "a/docs/\344\276\235\350\265\226\346\224\266\351\233\206.MarkDown" "b/docs/\344\276\235\350\265\226\346\224\266\351\233\206.MarkDown" index 66b3fae..d95d05c 100644 --- "a/docs/\344\276\235\350\265\226\346\224\266\351\233\206.MarkDown" +++ "b/docs/\344\276\235\350\265\226\346\224\266\351\233\206.MarkDown" @@ -52,6 +52,7 @@ function remove (arr, item) { const index = arr.indexOf(item) if (index > -1) { return arr.splice(index, 1) + } } } ``` @@ -70,11 +71,11 @@ class Watcher { Dep.target = this; /*Github:https://github.com/answershuto*/ /*触发渲染操作进行依赖收集*/ - this.cb.call(this.vm); + this.cb && this.cb.call(this.vm); } update () { - this.cb.call(this.vm); + this.cb && this.cb.call(this.vm); } } ```