Skip to content

Commit a3c0c27

Browse files
authored
docs: fix the description for enumerated attributes coercion change (#1208)
1 parent 9ed94d8 commit a3c0c27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/guide/migration/attribute-coercion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The absence of an enumerated attribute and `attr="false"` may produce different
8585
| `draggable` | `draggable` → `false` |
8686
| `spellcheck` | `spellcheck` → `true` |
8787

88-
To keep the old behavior work, and as we will be coercing `false` to `'false'`, in 3.x Vue developers need to make `v-bind` expression resolve to `false` or `'false'` for `contenteditable` and `spellcheck`.
88+
Since we no longer coerce `null` to `'false'` for “enumerated properties” in 3.x, in the case of `contenteditable` and `spellcheck`, developers will need to change those `v-bind` expressions that used to resolve to `null` to resolve to `false` or `'false'` in order to maintain the same behavior as 2.x.
8989

9090
In 2.x, invalid values were coerced to `'true'` for enumerated attributes. This was usually unintended and unlikely to be relied upon on a large scale. In 3.x `true` or `'true'` should be explicitly specified.
9191

@@ -107,7 +107,7 @@ In 3.x, `null` or `undefined` should be used to explicitly remove an attribute.
107107
<tbody>
108108
<tr>
109109
<td rowspan="3">2.x “Enumerated attrs”<br><small>i.e. <code>contenteditable</code>, <code>draggable</code> and <code>spellcheck</code>.</small></td>
110-
<td><code>undefined</code>, <code>false</code></td>
110+
<td><code>undefined</code></td>
111111
<td><code>undefined</code>, <code>null</code></td>
112112
<td><i>removed</i></td>
113113
</tr>
@@ -120,7 +120,7 @@ In 3.x, `null` or `undefined` should be used to explicitly remove an attribute.
120120
<td><code>"true"</code></td>
121121
</tr>
122122
<tr>
123-
<td><code>null</code>, <code>'false'</code></td>
123+
<td><code>null</code>, <code>false</code>, <code>'false'</code></td>
124124
<td><code>false</code>, <code>'false'</code></td>
125125
<td><code>"false"</code></td>
126126
</tr>

0 commit comments

Comments
 (0)