Преглед изворни кода

chore: check binding.value instead of just binding object (#5065)

YOU пре 9 година
родитељ
комит
d7287f4df8
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      examples/todomvc/app.js

+ 2 - 2
examples/todomvc/app.js

@@ -131,8 +131,8 @@ var app = new Vue({
   // before focusing on the input field.
   // https://vuejs.org/guide/custom-directive.html
   directives: {
-    'todo-focus': function (el, value) {
-      if (value) {
+    'todo-focus': function (el, binding) {
+      if (binding.value) {
         el.focus()
       }
     }